gpt4 book ai didi

python - pip安装中文服务器ssl错误

转载 作者:太空宇宙 更新时间:2023-11-03 13:45:06 25 4
gpt4 key购买 nike

我正在尝试在 Ubuntu 12.04 的中文服务器上安装 Django。

尝试运行 pip install django 时出现此错误:

Cannot fetch index base URL http://pypi.pyton.org/simple/
Could not find any downloads that satisfy the requirement django

完整的pip.log是:

Downloading/unpacking django

Getting page http://pypi.python.org/simple/django
Could not fetch URL http://pypi.python.org/simple/django: <urlopen error _ssl.c:489: The handshake operation timed out>
Will skip URL http://pypi.python.org/simple/django when looking for download links for django
Getting page http://pypi.python.org/simple/
Could not fetch URL http://pypi.python.org/simple/: The read operation timed out
Will skip URL http://pypi.python.org/simple/ when looking for download links for django
Cannot fetch index base URL http://pypi.python.org/simple/

URLs to search for versions for django:
* http://pypi.python.org/simple/django/
Getting page http://pypi.python.org/simple/django/
Could not fetch URL http://pypi.python.org/simple/django/: timed out
Will skip URL http://pypi.python.org/simple/django/ when looking for download links for django
Could not find any downloads that satisfy the requirement django

No distributions at all found for django

我读到这可能是 ssl 的系统时间问题,你们知道我该如何解决这个问题吗?我是否需要设置特定的系统时间才能使用 pip 安装软件包?

谢谢。

最佳答案

Great Firewall 最近一直在升级它的游戏,甚至是针对 VPN。您可能最终需要使用不同的(本地)镜像进行 pip 安装。在撰写本文时,这个对我有用:

pip install [YOUR_PACKAGE] -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com

关于python - pip安装中文服务器ssl错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22528001/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com