Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x pip-无法安装SSL_Python 3.x_Ssl_Pip_Raspberry Pi - Fatal编程技术网

Python 3.x pip-无法安装SSL

Python 3.x pip-无法安装SSL,python-3.x,ssl,pip,raspberry-pi,Python 3.x,Ssl,Pip,Raspberry Pi,我最近在Raspberry Pi 3上安装了Python 3.7。然而,我不知道安装过程中发生了什么,但是没有向pip添加任何包 我试图从源代码处重新编译Python,包括添加参数,如-enable optimizations和-altinstall,但没有成功。我没有尝试卸载Python3.x,因为我认为它有点混乱,因为它是从源代码安装的,并且可能还有依赖Python3.x的程序 以下是pip3列表的输出: $ pip3 list Package Version ---------- -

我最近在Raspberry Pi 3上安装了Python 3.7。然而,我不知道安装过程中发生了什么,但是没有向pip添加任何包

我试图从源代码处重新编译Python,包括添加参数,如
-enable optimizations
-altinstall
,但没有成功。我没有尝试卸载Python3.x,因为我认为它有点混乱,因为它是从源代码安装的,并且可能还有依赖Python3.x的程序

以下是
pip3列表的输出:

$ pip3 list
Package    Version
---------- -------
pip        19.0.3
setuptools 40.8.0
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

请注意,我已经安装了
libssl-dev

好吧,虽然Python 3.7没有apt-get中的包,但python3-pip有。我使用了
sudo-apt-get-install-python3-pip
和。。。仍然不起作用,同样的错误。然而,我找到了编译Python的安装位置,我有3个不同的3.x版本。我将删除它们并重新编译。。。再说一遍……您是从源代码编译Python的吗?如果是,则未构建
ssl
模块,很可能是因为构建环境配置错误(仅安装OpenSSL libs是不够的)。@hoefling是的。您知道如何正确配置它吗?具有(或多或少)完整的生成依赖项列表。然而,最新的Raspbian已经提供了Python3.7——我宁愿修复没有添加到pip中的任何包,而不是从源代码构建不可管理的安装。