我正在尝试按照此处列出的说明在Heroku上放置一个Django项目:http://devcenter.heroku.com/articles/django
但是,每当我到达此行时,pip都会失败:
git push heroku master
-----> Heroku receiving push
-----> Python/Django app detected
-----> Preparing virtualenv version 1.7
New python executable in ./bin/python
Installing distribute...........................................................................................................................................................................................done.
Installing pip...............done.
-----> Activating virtualenv
-----> Installing dependencies using pip version 1.0.2
Downloading/unpacking Brlapi==0.5.5 (from -r requirements.txt (line 1))
Could not find any downloads that satisfy the requirement Brlapi==0.5.5 (from -r requirements.txt (line 1))
No distributions at all found for Brlapi==0.5.5 (from -r requirements.txt (line 1))
. Storing complete log in /app/.pip/pip.log
! Heroku push rejected, failed to compile Python/django app
To git@heroku.com:fierce-stone-5846.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:fierce-stone-5846.git
问题似乎是pip无法找到依赖关系。我到处寻找答案,所以你提供的任何建议都会有用。如果需要,您可以在此处找到项目以及requirements.txt文件:https://github.com/Ballaw/Twithub
答案 0 :(得分:1)
从这stackoverflow question你可以做到:
virtualenv --no-site-packages venv
--no-site-packages选项可防止虚拟环境访问系统上的所有软件包。