【发布时间】:2018-04-26 16:41:30
【问题描述】:
我无法在 ubuntu 16.04 的 python3 上安装 django。 这是我尝试过的:
1. pip3 install django
2. pip3 install --trusted-host pypi.python.org django
3. pip3 install --index-url=http://pypi.python.org/simple --trusted-host pypi.python.org django
我不断收到同样的错误:
Could not fetch URL https://pypi.python.org/simple/django/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement django (from versions: )
No matching distribution found for django
我在 python 2.7 上安装了 Django,但我在 python 3.6 上需要它。
当我跑步时
sudo apt-get install python3-django
它说
python3-django is already the newest version (1.8.7-1ubuntu5.5).
我相信这是因为我在 python3.5 上安装了带有 Django 的 python3.5,但我在 3.6 上需要它。 Python3 指的是 python3.6。我的 pip3 是最新的。
感谢任何帮助。
【问题讨论】:
-
你是如何分别安装 Python 3.5 和 3.6 的?如果您只是将 3.5 升级到 3.6,这就是您所要做的,您不必重新安装 Django 之类的库。
-
@DanielRoseman 我分别安装了它们。
-
@the_storyteller 在安装 python3.6 之前我没有这样做。现在,我用 python3.6 运行了它,但仍然没有。同样的错误。