如何在Ubuntu中修复安装烧瓶

时间:2020-06-14 05:20:13

标签: python-3.x ubuntu flask anaconda pipenv

我在Ubuntu上安装了flask。在pipenv中,我想安装Flask来运行它。但它在下面说。

pip install flask
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/flask/
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/flask/
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/flask/
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/flask/
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/flask/
Could not fetch URL https://pypi.org/simple/flask/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/flask/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement flask (from versions: none)
ERROR: No matching distribution found for flask

我认为这来自ubuntu中的python路径。当我在python解释器中打印sys.path时,它在下面说。

>>> import sys
>>> print(sys.path)
['', '/home/use/app/anaconda3/lib/python37.zip', 
'/home/use/app/anaconda3/lib/python3.7', 
'/home/use/app/anaconda3/lib/python3.7/lib-dynload', 
'/home/use/app/anaconda3/lib/python3.7/site-packages']

有人帮助我安装Flask在Pipenv中运行。 谢谢。

0 个答案:

没有答案
相关问题