Could not find a version that satisfies the requirement pkg-resources==0.0.0

 ̄綄美尐妖づ 提交于 2020-07-31 16:38:27

问题


My app is deployed on heroku.

When I push my code via git push heroku master. It gives me this error

Collecting pkg-resources==0.0.0 (from -r requirements.txt (line 14))
remote:          Could not find a version that satisfies the requirement pkg-resources==0.0.0 (from -r requirements.txt (line 14)) (from versions: )
remote:        No matching distribution found for pkg-resources==0.0.0 (from -r requirements.txt (line 14))
remote:  !     Push rejected, failed to compile Python app.

requirement.txt

amqp==2.1.1
billiard==3.5.0.2
boto==2.42.0
celery==4.0.0
dj-database-url==0.4.1
Django==1.10.2
django-appconf==1.0.2
django-model-utils==2.6
django-storages==1.5.1
djangorestframework==3.4.7
gunicorn==19.6.0
Jinja2==2.8
kombu==4.0.0
MarkupSafe==0.23
optional-django==0.1.0
pep8==1.7.0
pkg-resources==0.0.0
psycopg2==2.6.2
pyflakes==1.3.0
pytz==2016.7
rcssmin==1.0.6
requests==2.12.1
rjsmin==1.0.12
vine==1.1.3
whitenoise==3.2.2

Note: Its working perfectly fine on my local server.

My Question is why is not working on heroku but working on local. ???


回答1:


Remove Following line from requirements.txt.

pkg-resources==0.0.0




回答2:


To avoid having it in requirements.txt everytime you do a freeze, remove it from your virtual environment with pip uninstall pkg-resources==0.0.0




回答3:


It appears Heroku CLI is using dependencies from a different local branch. If you are running:

$ git push origin master

to deploy your application on Heroku, ensure that locally you are switched to master branch.



来源:https://stackoverflow.com/questions/40670602/could-not-find-a-version-that-satisfies-the-requirement-pkg-resources-0-0-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!