前段时间运行
pip3 install numpy
时, 遇到如下异常.
localhost:bin sean$ pip3 install numpy --trusted-host pypi.douban.com
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/numpy/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/numpy/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/numpy/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/numpy/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/numpy/
Could not fetch URL https://pypi.org/simple/numpy/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/numpy/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement numpy (from versions: none)
ERROR: No matching distribution found for numpy
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
根据描述. 猜测有2种情况:
- 检查OpenSSL是否安装好. (使用
openssl version
进行查看)
localhost:bin sean$ openssl version
LibreSSL 2.6.5
mac安装openssl
可以选择编译安装. 或者brew install openssl
.
localhost:HoshinoBot sean$ python3
Python 3.8.6 (v3.8.6:db455296be, Sep 23 2020, 13:31:39)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
# 如果错误这边是会有报错的。
个人使用后.并没有成效.
- 重装python(有效)
之前是使用编译安装. 最后实在没有办法.选择了使用dmg
进行安装. 问题解决.
localhost:HoshinoBot sean$ pip3 install -r requirements.txt
Collecting nonebot[scheduler]~=1.6.0
Using cached nonebot-1.6.0.tar.gz (24 kB)
Requirement already satisfied: aiocqhttp>=1.2 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from -r requirements.txt (line 2)) (1.3.0)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/lxml/
Collecting lxml>=4.4.1
Downloading lxml-4.6.1-cp38-cp38-macosx_10_9_x86_64.whl (4.6 MB)
|████████████████████████████████| 4.6 MB 15 kB/s
Requirement already satisfied: pytz>=2019.3 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from -r requirements.txt (line 4)) (2020.4)
Requirement already satisfied: requests>=2.22.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from -r requirements.txt (line 5)) (2.24.0)
Collecting sogou_tr_free>=0.0.6
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org 包名
Pycharm 用pip命令安装第三方包出现retrying且ssl error问题汇总

windows环境pip安装时一直报错Could not fetch URL https://pypi.org/simple/xrld/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.org’, port=443): Max retries exceeded with url
pip3 install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple --user
pip3 install -r requirements.txt xlrd -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
--trusted-host pypi.org --trusted-host files.pythonhosted.org
pip3 install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.org --trusted-host files.pythonhosted.org
pip3 install aiohttp>=3.6.1 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
问题描述前段时间运行pip3 install numpy时, 遇到如下异常.localhost:bin sean$ pip3 install numpy --trusted-host pypi.douban.comWARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.WARNING: Retrying (Retry(total=
数据分析人工智能最基础一个库:numpy(numeric(数字化) python)
中文官网:https://www.numpy.org.cn/查看API,如何使用
使用某个库,导包,import numpy as np
ModuleNotFoundError: No module named 'numpy',集成环境下,没有numpy这个模块
没有该模块,安装 pip install numpy
常用函数的使用
平均值:mean
最大值:max
最小值:min
标准差:std
方差:var
求多少次幂:power
加法:add
减法:subtract
乘法:multiply
1.问题所在
我在centos7中安装了python3.8,在使用pip3安装一个第三方库的时候出现无法使用ssl的报错。
ssl模块确实在lib/python3.8这个目录下,为什么会报错呢,百度了一下才知道python中要使用ssl需要有openssl作为前置。
一般centos7中都是有openssl模块的,打开centos7自带的python2.7导入ssl发现正常,用python3.8导入却报错。
我安装python3.8的时候使用了–with-ssl命令,但是结果很明显此命令没有有效执行,然
在安装新版Anaconda(py3.6以上)时,有几率会碰上讨厌的SSLError(详情见下),网上的解决方法并没有一针见血,此答案主要用来做一个记录(逃
问题描述:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available
Caused...
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(“Can’t connect to HTTPS URL because the SSL module is not available.”)’:
先激活虚拟环境。如
conda activate base
windows下配置Python第三方库我一般使用easy_install.
例如下载rsa,只需要在命令行下输入命令:easy_install rsa即可。
但是今天在配置openssl库的时候,使用easy_install pyOpenbSSL成功后,在导入openssl模块的时候一直不成功,
所以我就最中得到的egg文件后缀变为rar,解压后得到OpenSSL文件夹,把它放到site-
我在b站上面学习Vue的时候需要使用webpack进行模块化,那就安装webpack,老师说由于webpack需要nodejs的支持,所以我们还需安装nodejs,所以我就先安装nodejs,然后在安装webpack
第一步:安装nodejs
老师上面nodejs的版本是10.13.0,所以我也安装该版本,在nodejs官网上面是最新的12.8.4,这不符合我的要求,于是我找到了所有nodejs历史版本的链接(https://nodejs.org/dist/),由于我本次使用的nodejs版
在Python中,有些第三方包是内置的,例如math、os等,在安装Python时就已经包含了这些包,因此不需要使用pip进行安装。而对于其他第三方包,例如numpy、pandas等,需要使用pip进行安装,因为它们不是Python内置的包。
此外,有些第三方包可能已经被安装在系统的Python库中,也就是说,在你安装Python时,也安装了这些包,但是你可能需要使用pip进行更新或重新安装。在这种情况下,你可能会遇到不需要使用pip的第三方包。
总之,需要使用pip安装第三方包的原因是因为这些包没有被内置在Python中,或者需要更新或重新安装。
[SpringBoot Usage] SpringBoot (3)配置文件及其相关标签使用 (@ConfigurationProperties/@Value/Environment)
[SpringBoot Usage] SpringBoot (2) Restful请求及其相关标签
[SpringBoot Usage] SpringBoot (1) QuickStart