【问题标题】:Why is Django 1.0.x not able to install from PyPI?为什么 Django 1.0.x 无法从 PyPI 安装?
【发布时间】:2012-12-02 00:15:34
【问题描述】:

我在 virtualenv 上试过了:

(venv) $ pip install Django==1.0.4
Downloading/unpacking Django==1.0.4
  Could not find a version that satisfies the requirement Django==1.0.4 (from versions: )
No distributions matching the version for Django==1.0.4
Storing complete log in /home/tokibito/.pip/pip.log

【问题讨论】:

  • 看起来好像最新版本是唯一可以从 pypi 下载的版本。
  • @hd1 - 这不是真的 - 请参阅 pypi.python.org/simple/Django 了解 PyPI 提供的版本列表。

标签: python django virtualenv pip easy-install


【解决方案1】:

您可以在 requirements.txt 文件中指定替代代码源。

#Django==1.0.4
git+https://github.com/django/django.git@1.0.4

【讨论】:

    【解决方案2】:

    不幸的是,PyPI 只有 Django 1.1.4 及更高版本。如果你想要旧版本,你可以直接从 github 安装:

    pip install git+https://github.com/django/django.git@1.0.4

    【讨论】:

    • +1,干得好,我认为你以完整的命令击败了我几秒钟。
    • 谢谢。我决定使用它。
    • 记住我可以在哪里安装 django :D
    【解决方案3】:

    您始终可以直接从official Github repository 获得您想要的版本point your requirement.txt。我从来没有这样做过,所以我无法引导您完成它,但如果您需要运行不在 PyPI 上的特定版本,这似乎是一个可行的选择。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多