【问题标题】:Pip installation failed: could not fetch URL [duplicate]Pip 安装失败:无法获取 URL [重复]
【发布时间】:2021-08-06 19:37:30
【问题描述】:

我以管理员身份运行cmd,并创建了一个venv 和一个pip 文件。但是当尝试pipenv install zappa 时,它会说(注意:这适用于所有事物,无论是flask 还是libssl-dev 等):

Error:  An error occurred while installing zappa!
Error text: Could not fetch URL https://pypi.org/simple/zappa/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/zappa/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

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/zappa/
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/zappa/
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/zappa/
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/zappa/
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/zappa/
ERROR: Could not find a version that satisfies the requirement zappa (from versions: none)
ERROR: No matching distribution found for zappa

Installation Failed

原因是什么?我尝试将它安装在环境之外,它确实可以工作,但是当我运行 zappa init 时它无法识别 Zappa。

我看到这是一个常见问题,建议升级 pip(已升级)或安装一些其他库,例如 libssl-dev,但这也不起作用,因为我无法使用 pip 安装任何东西.我正在使用 Windows。

【问题讨论】:

  • @msanford 我试过了,这就是我尝试安装的原因,例如 libssl-dev(我使用 Windows)。没有任何效果。

标签: python pip


【解决方案1】:

请在你的虚拟环境中运行 pip install zappa 然后运行 ​​zappa init

【讨论】:

  • 我已经尝试过了,我得到了同样的错误。如果我在环境之外这样做,它确实可以工作,但是 init 不起作用:/
猜你喜欢
  • 2019-05-01
  • 1970-01-01
  • 1970-01-01
  • 2022-01-14
  • 2021-09-07
  • 2014-09-07
  • 2018-10-23
  • 1970-01-01
  • 2016-09-25
相关资源
最近更新 更多