Heroku 设置 - pip 无法找到/安装依赖项
我正在尝试按照此处列出的说明将 Django 项目放在 Heroku 上: 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 [email protected]:fierce-stone-5846.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:fierce-stone-5846.git
问题似乎是 pip 找不到依赖项。我到处寻找答案,因此您提供的任何建议都会很有用。如果需要,您可以在此处找到该项目以及 requests.txt 文件: https://github.com/Ballaw/特维苏布
I am trying to put a Django project on heroku following the instructions listed here: http://devcenter.heroku.com/articles/django
However, whenever I get to this line pip fails :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 [email protected]:fierce-stone-5846.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:fierce-stone-5846.git
The problem seems to be that pip can't find the dependencies. I have searched everywhere for an answer so any advice you can offer would be useful. If need be you can find the project along with the requirements.txt file here: https://github.com/Ballaw/Twithub
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从这个 stackoverflow 问题中,您可以执行以下操作:
--no-site-packages 选项可防止虚拟环境访问系统上的所有包。
From this stackoverflow question you can do:
The --no-site-packages option prevents the virtual environment from having access to all the packages on your system.