gpt4 book ai didi

python - Heroku Upload - 找不到满足要求的版本 anaconda-client==1.4.0

转载 作者:太空狗 更新时间:2023-10-29 20:55:25 24 4
gpt4 key购买 nike

我正在尝试将 Django 应用程序推送到 Heroku,但在运行 git push heroku master 时出现以下错误:

Counting objects: 80, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (74/74), done.
Writing objects: 100% (80/80), 990.21 KiB | 0 bytes/s, done.
Total 80 (delta 20), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: ! The latest version of Python 2 is python-2.7.14 (you are using
python-2.7.12, which is unsupported).
remote: ! We recommend upgrading by specifying the latest version
(python-2.7.14).
remote: Learn More: https://devcenter.heroku.com/articles/python-
runtimes
remote: -----> Installing python-2.7.12
remote: -----> Installing pip
remote: -----> Installing requirements with pip
remote: Collecting alabaster==0.7.7 (from -r
/tmp/build_a1f6d188f9e0e61e01076a73d4e10542/requirements.txt (line 1))
remote: Downloading alabaster-0.7.7-py2.py3-none-any.whl
remote: Collecting anaconda-client==1.4.0 (from -r
/tmp/build_a1f6d188f9e0e61e01076a73d4e10542/requirements.txt (line 2))
remote: Could not find a version that satisfies the requirement
anaconda-client==1.4.0 (from -r
/tmp/build_a1f6d188f9e0e61e01076a73d4e10542/requirements.txt (line 2)) (from
versions: 1.1.1, 1.2.2)
remote: No matching distribution found for anaconda-client==1.4.0 (from
-r /tmp/build_a1f6d188f9e0e61e01076a73d4e10542/requirements.txt (line 2))
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to demo-freshstart.

它似乎与 Anaconda 有关,但我很早就在我的 requirements.txt 中看到了 Anaconda,所以认为它可能只是出于其他原因而被 catch 的第一件事。

最佳答案

对于每条消息

No matching distribution found for X

你得到,你必须手动做:

1 - 在 X 出现的 requirements.txt 行,删除 ==<version number>
2 - 保存文件
3 - 提交
4 - 推送

对提示报告的下一个错误再次执行此操作,直到到达 requirements.txt 中包含的列表的末尾。

(如果您的 X 是 psycopg2 ,请将其替换为 psycopg2-binary )。


通过安装和运行pip-chill可以达到相同的结果

pip install pip_chill
pip-chill --no-version > requirements.txt

注意:这是一个last-resource解决方案,所以,在实现之前,看看你是否可以按照this answer的说明解决问题

关于python - Heroku Upload - 找不到满足要求的版本 anaconda-client==1.4.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47304291/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com