Heroku 设置 - pip 无法找到/安装依赖项

发布于 2025-01-07 08:03:00 字数 1745 浏览 1 评论 0原文

我正在尝试按照此处列出的说明将 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

画骨成沙 2025-01-14 08:03:00

从这个 stackoverflow 问题中,您可以执行以下操作:

virtualenv --no-site-packages venv

--no-site-packages 选项可防止虚拟环境访问系统上的所有包。

From this stackoverflow question you can do:

virtualenv --no-site-packages venv

The --no-site-packages option prevents the virtual environment from having access to all the packages on your system.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文