无法推送到Heroku:/app/.heroku/python/bin/pip:No这样的文件或目录 [英] Fail to push to Heroku: /app/.heroku/python/bin/pip:No such file or directory

查看:144
本文介绍了无法推送到Heroku:/app/.heroku/python/bin/pip:No这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


$ b

  / app /我想要将Django项目推送到Heroku,但它一直告诉我以下内容: .heroku / python / bin / pip:没有这样的文件或目录

完整的错误信息如下所示。我该如何解决这个问题?我需要首先在Heroku上安装点子吗?

 计数对象:451,完成。 
使用多达8个线程的增量压缩。
压缩对象:100%(383/383),完成。
写作对象:100%(451/451),1.07 MiB | 349.00 KiB / s,完成。
总计451(delta 87),重用0(delta 0)
remote:压缩源文件...完成。
remote:建筑来源:
remote:
remote:-----> Python应用程序检测到
remote:----->安装python-3.5.1
remote:----->安装pip
remote:----->安装带有画中画
遥控要求:/应用/ tmp目录/ buildpacks / 779a8bbfbbe7e1b715476c0b23fc63a2103b3e4131eda558669aba8fb5e6e05682419376144189b29beb5dee6d7626b4d3385edb0954bffea6c67d8cf622fd51
/斌/措施/ PIP安装:5号线:/app/.heroku/python/bin/pip:没有这样的文件或目录
remote:!推送被拒绝,未能编译Python应用程序。
remote:
remote:!推送失败
remote:验证部署...
remote:
remote:!推倒拒绝到洛基托尔70537。
远程:
到https://git.heroku.com/rocky-tor-70537.git
! [remote rejected] master - > master(pre-receive hook refused)
错误:无法将一些文件推送到'https://git.heroku.com/rocky-tor-70537.git'

我的requirements.txt文件是空的,如下所示:

 #这是用于Heroku和其他服务器。 
#在本地,你应该安装requirements_base.txt
-r requirements_server.txt

我的requirements_server.txt如下所示:

  -r requirements_base.txt 
在Windows / Mac本地开发环境,或者不正确安装
psycopg2> = 2.5.1

我的requirements_base.txt如下:

  appdirs == 1.4.3 
asgi-redis == 0.14.1
asgiref == 0.14.0
autobahn == 0.16.0
Babel == 2.3.4
boto == 2.42.0
channels == 0.17.3
colorama == 0.3.7
contextlib2 == 0.5.4
覆盖率== 4.2
daphne == 0.14.3
dj-database-url == 0.4 .1
Django == 1.8.8
django-countries == 4.0
django-easymoney == 0.7.1
django-floppyforms == 1.7.0
django-idmap == 0.4.1
django-vanilla-views == 1.0.4
djangorestframework == 3.4.6
honcho == 0.7.1
huey == 1.2 .0
IPy == 0.83
mock == 2.0.0
msgpack-python == 0.4.8
otree- core == 1.2.8
otree-save-the-change == 1.1.3
packaging == 16.8
pbr == 1.10.0
py == 1.4.31
pyparsing == 2.2.0
pytest == 2.9.2
pytest-django == 3.0.0
python-redis-lock == 3.2.0
pytz == 2016.6.1
raven == 5.25.0
redis == 2.10.5
请求== 2.11.1
架构== 0.6.2
six == 1.10.0
Twisted == 16.2.0
txaio == 2.5.1
unicodecsv == 0.14.1
whitenoise == 3.2.1
ws4py == 0.3.5
XlsxWriter == 0.9.3
zope.interface == 4.2.0


我最近遇到了这个问题,并且可以通过在runtime.txt中更改python版本来调整它。



更改为

  python-3.5.2 

但根据您列出的要求,您似乎永远无法进入requirements_base.txt。



在您的requirements_server.txt文件中,将其更改为:

  -r requirements_base.txt 

列在那里。


I am trying to push a Django project to Heroku, but it keeps telling me that the following:

/app/.heroku/python/bin/pip: No such file or directory

The complete error message is shown below. How can I address this issue? Do I need to first install pip on Heroku?

Counting objects: 451, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (383/383), done.
Writing objects: 100% (451/451), 1.07 MiB | 349.00 KiB/s, done.
Total 451 (delta 87), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: -----> Installing python-3.5.1
remote: -----> Installing pip
remote: -----> Installing requirements with pip
remote:        /app/tmp/buildpacks/779a8bbfbbe7e1b715476c0b23fc63a2103b3e4131eda558669aba8fb5e6e05682419376144189b29beb5dee6d7626b4d3385edb0954bffea6c67d8cf622fd51
/bin/steps/pip-install: line 5: /app/.heroku/python/bin/pip: No such file or directory
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !   Push rejected to rocky-tor-70537.
remote:
To https://git.heroku.com/rocky-tor-70537.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/rocky-tor-70537.git'

My requirements.txt file is empty, as shown below.

# this is for Heroku and other servers.
# Locally, you should install requirements_base.txt
-r requirements_server.txt

My requirements_server.txt is as follows:

-r requirements_base.txt
# packages that are unnecessary on Windows/Mac local dev environments, or don't install properly
psycopg2>=2.5.1

My requirements_base.txt is as follows:

appdirs==1.4.3
asgi-redis==0.14.1
asgiref==0.14.0
autobahn==0.16.0
Babel==2.3.4
boto==2.42.0
channels==0.17.3
colorama==0.3.7
contextlib2==0.5.4
coverage==4.2
daphne==0.14.3
dj-database-url==0.4.1
Django==1.8.8
django-countries==4.0
django-easymoney==0.7.1
django-floppyforms==1.7.0
django-idmap==0.4.1
django-vanilla-views==1.0.4
djangorestframework==3.4.6
honcho==0.7.1
huey==1.2.0
IPy==0.83
mock==2.0.0
msgpack-python==0.4.8
otree-core==1.2.8
otree-save-the-change==1.1.3
packaging==16.8
pbr==1.10.0
py==1.4.31
pyparsing==2.2.0
pytest==2.9.2
pytest-django==3.0.0
python-redis-lock==3.2.0
pytz==2016.6.1
raven==5.25.0
redis==2.10.5
requests==2.11.1
schema==0.6.2
six==1.10.0
Twisted==16.2.0
txaio==2.5.1
unicodecsv==0.14.1
whitenoise==3.2.1
ws4py==0.3.5
XlsxWriter==0.9.3
zope.interface==4.2.0

解决方案

I ran into this issue recently and was able to adjust it by changing the python version in the runtime.txt.

Changing to

python-3.5.2

But based off your requirements that you have listed, it seems like you are never getting to the requirements_base.txt.

In your requirements_server.txt file, change it so that:

-r requirements_base.txt 

is listed there.

这篇关于无法推送到Heroku:/app/.heroku/python/bin/pip:No这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆