我无法安装Djangoconstance,错误为找不到满足Djangoconstance要求的版本(来自版本:)

2024-04-27 16:04:19 发布

您现在位置:Python中文网/ 问答频道 /正文

constance docs

安装constance

pip install django-constance

但我无法安装,错误日志为:

$ pip3 install django-constance
Collecting django-constance
  Could not fetch URL https://pypi.python.org/simple/django-constance/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645) - skipping
  Could not find a version that satisfies the requirement django-constance (from versions: )
No matching distribution found for django-constance

Tags: installpipthedjangoconstanceurlssldocs
2条回答

控制台的以下输出:

There was a problem confirming the ssl certificate

指示在尝试安装此依赖项时出现网络问题。似乎与这个问题有关: pip install fails with "connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)"
解决方案是:
您可能需要将受信任的主机和代理添加到配置文件中。

pip.ini(Windows)或pip.conf(unix)

[global]
trusted-host = pypi.python.org
               pypi.org
               files.pythonhosted.org

我希望这有帮助

检查您正在运行的python版本,例如2.7或3.5。然后为您拥有的相应版本获取适当的软件包版本,并使用pip install package name==%.%.%.%.%安装它,其中%.%.%是python版本的软件包版本。请注意,有些包只针对python2发布,而另一些则针对python3

相关问题 更多 >