【问题标题】:django-sha2 not installing on heroku serverdjango-sha2 未安装在 heroku 服务器上
【发布时间】:2012-03-08 07:44:11
【问题描述】:

我在将我的 django 应用程序部署到 heroku 时遇到问题

在第一部分中,heroku 的推送在找不到 django-sha2==0.4 的任何下载时失败,但是当我在本地计算机上进行 pip 安装时,它可以工作

hh:djangoherokutest Kinnovate$ git push heroku master
Counting objects: 12, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 958 bytes, done.
Total 10 (delta 7), reused 0 (delta 0)

-----> Heroku receiving push
-----> Python/Django app detected
-----> Preparing virtualenv version 1.7
       New python executable in ./bin/python
       Installing distribute..............................................................................................................................................................................................done.
       Installing pip...............done.
       Overwriting ./bin/activate with new content
       Overwriting ./bin/activate.fish with new content
       Overwriting ./bin/activate.csh with new content
-----> Activating virtualenv
-----> Installing dependencies using pip version 1.0.2
       Downloading/unpacking git+https://github.com/django/django.git (from -r requirements.txt (line 4))
         Cloning https://github.com/django/django.git to /tmp/pip-Jvyfwt-build
         Running setup.py egg_info for package from git+https://github.com/django/django.git

       Requirement already satisfied (use --upgrade to upgrade): py-bcrypt==0.2 in ./lib/python2.7/site-packages (from -r requirements.txt (line 1))
       Requirement already satisfied (use --upgrade to upgrade): ipython==0.12 in ./lib/python2.7/site-packages (from -r requirements.txt (line 2))
       Requirement already satisfied (use --upgrade to upgrade): Flask==0.8 in ./lib/python2.7/site-packages (from -r requirements.txt (line 3))
       Downloading/unpacking psycopg2==2.4.2 (from -r requirements.txt (line 5))
         Running setup.py egg_info for package psycopg2

           no previously-included directories found matching 'doc/src/_build'
         Requested psycopg2==2.4.2 (from -r requirements.txt (line 5)), but installing version 2.4.4
       Downloading/unpacking django-sha2==0.4 (from -r requirements.txt (line 6))
         Could not find any downloads that satisfy the requirement django-sha2==0.4 (from -r requirements.txt (line 6))
       No distributions at all found for django-sha2==0.4 (from -r requirements.txt (line 6))
       Storing complete log in /app/.pip/pip.log
 !     Heroku push rejected, failed to compile Python/django app

To git@heroku.com:growing-mountain-9962.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:growing-mountain-9962.git'
hh:djangoherokutest Kinnovate$ pip install django-sha2
Requirement already satisfied (use --upgrade to upgrade): django-sha2 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django_sha2-0.4-py2.7.egg
Requirement already satisfied (use --upgrade to upgrade): Django>=1.2 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from django-sha2)
Cleaning up...

我该如何解决这个问题?

【问题讨论】:

    标签: django heroku


    【解决方案1】:

    尝试放置 git+https://github.com/fwenzel/django-sha2.git 代替 django-sha2==0.4

    在 requirements.txt 中。这将直接链接到包。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-02-10
      • 2014-08-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-13
      相关资源
      最近更新 更多