相关疑难解决方法(0)

使用pip3安装软件包时,"Python中的SSL模块不可用"

我已成功在本地计算机上安装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 …

python ssl pip

75
推荐指数
16
解决办法
15万
查看次数

pip配置了需要TLS/SSL的位置,但Python中的ssl模块不可用

我正在使用Python3.6,当我尝试使用pip3安装"模块"时,我面临下面提到的问题"pip配置了需要TLS/SSL的位置,但是Python中的ssl模块不可用"

请帮我解决这个问题

python pip pexpect

73
推荐指数
18
解决办法
8万
查看次数

如何成功编译python 3.x

在尝试编译 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)

python gcc compiler-errors runpy python-3.7

9
推荐指数
2
解决办法
6691
查看次数

尝试使用Python 3.7.2 pip安装软件包会导致TSL / SSL错误

我正在继续:

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)

python pip python-3.x python-3.7

8
推荐指数
1
解决办法
6540
查看次数

pip无法确认SSL证书:SSL模块不可用

我正在尝试在我的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 pip raspberry-pi

5
推荐指数
2
解决办法
2万
查看次数

“ Python中的SSL模块不可用”

仍然在我的教程中学习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 pip

4
推荐指数
1
解决办法
2万
查看次数