我之前已经成功地部署了这个项目很多次,但是没有对项目根目录中的requirements.txt文件进行任何更改。
Heroku将不再以依赖问题为由接受相同的requirements.txt文件
Heroku仍然打开最后一个有效的部署,允许我“”heroku运行“pip freeze”
部署的heroku requirements.txt
appnope==0.1.2
asgiref==3.4.1
backcall==0.2.0
backports.entry-points-selectable==1.1.0
blis==0.7.4
catalogue==2.0.6
certifi==2021.5.30
charset-normalizer==2.0.4
ChatterBot==1.0.4
chatterbot-corpus==1.2.0
click==8.0.1
colorgram.py==1.2.0
cymem==2.0.5
debugpy==1.4.3
decorator==5.1.0
distlib==0.3.3
dj-database-url==0.5.0
Django==3.2.8
django-filter==2.4.0
django-heroku==0.0.0
django-simple-chatbot==0.0.9
django-widget-tweaks==1.4.8
djangorestframework==3.12.4
en-core-web-sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.1.0/en_core_web_sm-3.1.0-py3-none-any.whl
entrypoints==0.3
filelock==3.3.0
future==0.18.2
greenlet==1.1.2
gunicorn==20.1.0
heroku==0.1.4
httpie==2.4.0
huggingface-hub==0.0.12
idna==3.2
ipykernel==6.4.1
ipython==7.28.0
ipython-genutils==0.2.0
jedi==0.18.0
Jinja2==3.0.1
joblib==1.0.1
jupyter-client==7.0.3
jupyter-core==4.8.1
line-bot-sdk==1.20.0
MarkupSafe==2.0.1
mathparse==0.1.2
matplotlib-inline==0.1.3
murmurhash==1.0.5
nest-asyncio==1.5.1
nltk==3.6.2
numpy==1.21.2
packaging==21.0
parso==0.8.2
pathy==0.6.0
pexpect==4.8.0
pickleshare==0.7.5
Pillow==8.3.2
Pint==0.17
pipenv==2021.5.29
platformdirs==2.4.0
preshed==3.0.5
print==1.3.0
prompt-toolkit==3.0.20
psycopg==3.0b1
psycopg2==2.9.1
psycopg2-binary==2.9.1
ptyprocess==0.7.0
pydantic==1.8.2
Pygments==2.10.0
pymongo==3.12.0
pyparsing==2.4.7
PySocks==1.7.1
python-dateutil==2.7.5
pytz==2021.3
PyYAML==5.4.1
pyzmq==22.3.0
regex==2021.8.28
requests==2.26.0
requests-toolbelt==0.9.1
sacremoses==0.0.46
six==1.16.0
smart-open==5.2.1
spacy==3.1.3
spacy-alignments==0.8.3
spacy-legacy==3.0.8
spacy-transformers==1.0.6
SQLAlchemy==1.2.19
sqlparse==0.4.2
srsly==2.4.1
textblob==0.15.3
thinc==8.0.10
tokenizers==0.10.3
torch==1.8.1+cpu
torchvision==0.9.1+cpu
tornado==6.1
tqdm==4.62.2
traitlets==5.1.0
transformers==4.9.2
turtle==0.0.1
typer==0.4.0
typing-extensions==3.10.0.2
urllib3==1.26.6
virtualenv==20.8.1
virtualenv-clone==0.5.7
wasabi==0.8.2现在,当我尝试使用相同的requirements.txt文件部署我的最新版本时,heroku会告诉我以下错误。
The conflict is caused by:
The user requested PyYAML==5.4.1
chatterbot-corpus 1.2.0 depends on PyYAML<4.0 and >=3.12
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
! Push rejected, failed to compile Python app.
! Push failed松开版本或将其完全删除并不能解决问题。
有没有一种方法可以使用下面这样的方式部署应用程序
-r requirements.txt -no dependencies
它融化了我的大脑,试图解决这个问题是从哪里产生的,因为我最近一直在使用和更新(通过GitHub推送)应用程序,没有出现问题。
我已经检查了GitHub推送文档,回滚了对我的应用程序所做的唯一更改,但依赖项仍然存在错误。
heroku是否为我清除了缓存,或者更新了依赖项的使用方式?我完全进退两难了。
提前感谢您给出的任何见解。
发布于 2021-11-10 11:50:23
错误: ResolutionImpossible:
在Python3上,pip现在使用其新的依赖解析器,它在设计上更加严格。
依赖项版本现在在安装期间得到完全验证,如果发现依赖项冲突,pip安装步骤将失败并显示ResolutionImpossible错误。(https://devcenter.heroku.com/changelog-items/2288)
在heroku上使用此构建包以继续使用以前版本的pip:https://github.com/heroku/heroku-buildpack-python.git#v201
https://stackoverflow.com/questions/69805274
复制相似问题