我已成功在本地计算机上安装Python 3.4和Python 3.6,但无法安装包pip3.
执行时pip3 install <package>,我收到以下与SSL相关的错误:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting <package>
Could not fetch URL https://pypi.python.org/simple/<package>/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement <package> (from versions: )
No matching distribution found for <package>
Run Code Online (Sandbox Code Playgroud)
如何修复我的Python3.x安装,以便我可以安装包pip install …
我正在使用Python3.6,当我尝试使用pip3安装"模块"时,我面临下面提到的问题"pip配置了需要TLS/SSL的位置,但是Python中的ssl模块不可用"
请帮我解决这个问题
在尝试编译 python 3.7 时,我点击了Could not import runpy module:
jeremyr@b88:$ wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz
....
jeremyr@b88:~/Python-3.7.3$ ./configure --enable-optimizations
jeremyr@b88:~/Python-3.7.3$ make clean
jeremyr@b88:~/Python-3.7.3$ make -j32
....
gcc -pthread -Xlinker -export-dynamic -o Programs/_testembed Programs/_testembed.o libpython3.7m.a -lcrypt -lpthread -ldl -lutil -lm
./python -E -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
Could not import runpy module
Traceback (most recent call last):
File "/home/jeremyr/Python-3.7.3/Lib/runpy.py", line …Run Code Online (Sandbox Code Playgroud) 我正在继续:
Amazon Linux AMI 2018.03.0
Linux ip-xxx-yy-z-ww 4.14.77-70.59.amzn1.x86_64 #1 SMP Mon Nov 12 22:02:45 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)
多python环境。它同时安装了Python 2.7.15和3.7.2。
常规(Python2)pip正常运行。
当我尝试运行时pip3 install flask,出现以下错误:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting flask
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/flask/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by …Run Code Online (Sandbox Code Playgroud) 我正在尝试在我的Raspberry Pi Zero W上为Python 3.6安装RPi.GPIO,但不知何故它不会连接到python.org网站.我安装了2.7,3.0和3.6安装的pip,所以当我去做以下事情时:
sudo pip3.6 install RPi.GPIO
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
pi @ raspberrypi:〜$ sudo pip3.6安装RPi.GPIO
pip配置了需要TLS/SSL的位置,但是Python中的ssl模块不可用.
收集RPi.GPIO
无法获取URL https://pypi.python.org/simple/rpi-gpio/:确认ssl证书时出现问题:无法连接到HTTPS URL,因为SSL模块不可用.- 跳过
找不到满足要求的版本RPi.GPIO(来自版本:)
没有为RPi.GPIO找到匹配的发行版
我确实试过sudo apt-get install openssl了,但它仍然无法正常工作.我可以在桌面和手机上完美访问网站,但我的Raspberry Pi根本不会.知道我能做什么吗?
仍然在我的教程中学习python,我被告知要做
sudo -H pip install requests
Run Code Online (Sandbox Code Playgroud)
我得到以下内容:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting requests
Could not fetch URL https://pypi.python.org/simple/requests/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement requests (from versions: )
No matching distribution found for requests
Run Code Online (Sandbox Code Playgroud)
有人会知道我该怎么做才能彻底解决该问题吗?
提前非常感谢
python ×6
pip ×5
python-3.7 ×2
gcc ×1
pexpect ×1
python-3.x ×1
raspberry-pi ×1
runpy ×1
ssl ×1