python3.8 virtualenv pip无法升级 [英] python3.8 virtualenv pip not upgrading

查看:328
本文介绍了python3.8 virtualenv pip无法升级的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在运行以下命令时

pip install --upgrade pip

即使我无法安装任何其他软件包,它也会显示以下错误,因为它说先升级pip.

it shows following error even I can't install any other packages as it says upgrade pip first.

WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
WARNING: 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/pip/
WARNING: Retrying (Retry(total=3, 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/pip/
WARNING: Retrying (Retry(total=2, 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/pip/
WARNING: Retrying (Retry(total=1, 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/pip/
WARNING: Retrying (Retry(total=0, 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/pip/
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
Requirement already up-to-date: pip in ./environments/mjshare_env/lib/python3.8/site-packages (19.3.1)
WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

如果我跑步

pip list

我有以下包裹

Package    Version
---------- -------
pip        19.3.1 
setuptools 42.0.2 
wheel      0.33.6 

推荐答案

问题不在于pip的版本,而在于ssl.您安装的python版本没有ssl模块,如果您在未安装libssl-dev标头的情况下编译python,则可能会出现ssl模块. (或者您下载的版本是这样制作的.)

The problem is not with pip's version, but with ssl. The version of python you installed does not have the ssl module, which can occur if you compiled python without installing the libssl-dev headers. (Or the version you downloaded was made so).

这篇关于python3.8 virtualenv pip无法升级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆