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

2024-04-25 07:51:06 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图将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.

似乎这和水蟒有关,但我在requirements.txt中很早就看到了水蟒,所以我认为这可能是它因为其他原因被抓到的第一件事。


Tags: tofrombuildtxtclientobjectsremoteversion
3条回答

每一条信息

No matching distribution found for X

您必须手动从requirements.txt文件中删除该行:

1-删除X出现的行
2-保存文件
3-提交
4-按

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

根据PyPI,不存在anaconda客户端版本1.4.0:最高版本是1.2.2。

你在康达创造了环境吗?

如果是,在激活env之后。您需要conda install pip来激活pip install,否则pip冻结将返回到默认的anaconda环境。(这就是你在那里看到他们的原因)

  1. conda install pip
  2. pip再次安装所有可用的软件包。(例如pip install django
  3. pip freeze > requirements.txt

请看下面的神话5 https://jakevdp.github.io/blog/2016/08/25/conda-myths-and-misconceptions/

相关问题 更多 >