[英]Python virtualenv pip install gives ssl error
Okay so I'm trying to set up a virtualenv (on legacy server btw) (python3.6.9, ubuntu 18.10), but whenever I try to install packages for it I get好的,所以我正在尝试设置一个 virtualenv(在旧版服务器上)(python3.6.9,ubuntu 18.10),但是每当我尝试为其安装软件包时,我都会得到
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
This is the case for pip
, pip3
, pip3.6
, python -m pip
, python3 -m pip
and python3.6 -m pip
. This is the case for
pip
, pip3
, pip3.6
, python -m pip
, python3 -m pip
and python3.6 -m pip
. I have tried reinstalling python, pip, virtualenv and other stuff, but it seems to persist whatever I try.我曾尝试重新安装 python、pip、virtualenv 和其他东西,但无论我尝试什么,它似乎都会持续存在。
Any ideas on how to resolve this?关于如何解决这个问题的任何想法?
Alright, so I found something that worked.好吧,所以我找到了一些有用的东西。 The ssl was apparently more broken than I expected, but thanks to the fact that we had a second server which did function normally, I was able to copy the file (for those interested:
cp /usr/local/lib/python3.6/lib-dynload/_ssl.cpython-36m-x86_64-linux-gnu.so tmp
, then connect SFTP Net drive to extract tmp, connect to other server and insert tmp, then cp tmp /usr/local/lib/python3.6/lib-dynload/_ssl.cpython-36m-x86_64-linux-gnu.so
) and that made it function (almost) normally (small warnings aside). ssl 显然比我预期的更坏,但由于我们有第二台服务器正常运行 function,我能够复制文件(对于那些感兴趣的人:
cp /usr/local/lib/python3.6/lib-dynload/_ssl.cpython-36m-x86_64-linux-gnu.so tmp
,然后连接SFTP网盘提取tmp,连接到其他服务器并插入tmp,然后cp tmp /usr/local/lib/python3.6/lib-dynload/_ssl.cpython-36m-x86_64-linux-gnu.so
),这使它成为 function (几乎)正常(除了小警告)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.