我无法安装django-constance,错误无法找到满足要求的版本django-constance(来自版本:)

时间:2018-05-08 07:01:33

标签: python pip

来自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

2 个答案:

答案 0 :(得分:0)

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

发布

答案 1 :(得分:0)

控制台的以下输出:

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

我希望这会有所帮助。