我已成功在本地计算机上安装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 …
在 GoDaddy VPS CentOs 7 上安装新的 Python 3.7.1。\n尝试 pip3 install virtualenv 或 python 3 -m pip install virtualenv 并获取:
\n\npip 配置了需要 TLS/SSL 的位置,但是 Python 中的 ssl 模块不可用。
\n\nopenssl-devel 已安装且是最新的
\n\n这个问题已经被问过很多次了,但是我找到的解决方案并没有解决我的问题。\n谢谢大家!
\n\n我尝试了以下基于 CentOs 和 Linux 的解决方案:
\n\n使用 pip3 安装软件包时“Python 中的 SSL 模块不可用” \n # 允许构建 python ssl 库\n yum install openssl-devel\n # 下载任何Python 版本的源\n cd /usr/src\n wget https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tar.xz \n tar xf Python-3.7.1.tar.xz \n cd Python-3.7.1
\n\n # Configure the build w/ your installed libraries\n …Run Code Online (Sandbox Code Playgroud)