[英]Elastic Beanstalk, Django deployment error, Could not find a version that satisfies the requirement pkg-resources==0.0.0
[英]Could not find a version that satisfies the requirement pkg-resources==0.0.0
我的應用程序部署在heroku
上。
當我通過git push heroku master
。 它給了我這個錯誤
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
注意:它在我的本地服務器上工作得很好。
我的問題是為什么不在heroku
上工作,而是在local
工作。 ???
從requirements.txt中刪除以下行。
pkg-resources==0.0.0
為了避免每次凍結時都在requirements.txt中,請使用pip uninstall pkg-resources==0.0.0
將其從虛擬環境中刪除
從 requirements.txt 中刪除pkg-resources==0.0.0
如果您希望下次凍結時避免該問題,請使用pip uninstall pkg-resources==0.0.0
看來Heroku CLI正在使用來自不同本地分支的依賴項。 如果您正在運行:
$ git push origin master
在Heroku上部署您的應用程序,確保您在本地切換到主分支。
貓要求.txt | grep --invert-match pkg-resources | xargs -n 1 pip 安裝
有關對我有用的更詳細的文章,請參閱下面的鏈接! https://code-specialist.com/python/pkg-resources
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.