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

Python 我无法安装django constance,错误为找不到满足django constance要求的版本(来自版本:),python,pip,Python,Pip,从: 安装constance: pip安装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_

从:

安装constance:

pip安装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

检查您正在运行的python版本,例如2.7或3.5。然后为您拥有的相应版本获取适当的软件包版本,并使用pip安装软件包名称==%%.%.%,其中%.%.%是python版本的软件包版本。请注意,有些软件包仅针对python2发布,而另一些则针对Python3发布。控制台的以下输出:

There was a problem confirming the ssl certificate
表示在尝试安装此依赖项时出现网络问题。这似乎与这个问题有关:
当时的解决方案是:
您可能希望将受信任的主机和代理添加到配置文件中。

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


我希望这会有所帮助

你能更详细地描述一下答案吗?有些软件包是特定于版本的。有些是专门为Python2设计的,而另一些是为Python3设计的。您的错误很可能是由此类错误引起的。要解决这个问题,必须为python版本指定特定的包版本。因此,假设版本为1.00,您必须执行pip安装包==1.00,而不是pip安装包。以Django Django 1.9am为例,较低版本不在Python3上运行,而上述版本的2.0an在Python3上运行,这可能是
[global]
trusted-host = pypi.python.org
               pypi.org
               files.pythonhosted.org