Heroku 上传 - 找不到满足 anaconda-client==1.4.0 要求的版本 [英] Heroku Upload - Could not find a version that satisfies the requirement anaconda-client==1.4.0

查看:29
本文介绍了Heroku 上传 - 找不到满足 anaconda-client==1.4.0 要求的版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to push a Django app onto Heroku, but am getting the following error upon running 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,所以我认为这可能只是由于其他原因引起的第一件事.

Seems like it has something to do with Anaconda, but I see Anaconda pretty early on in my requirements.txt, so thinking it could just be the first thing it's getting caught up on for some other reason.

推荐答案

对于每条消息

未找到 X 的匹配分布

No matching distribution found for X

你得到的,你必须手动做:

that you get, you have to manually do:

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

1 - at the line of requirements.txt where X appears, remove ==<version number>
2 - save the file
3 - commit
4 - push

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

do it again for the next error reported by the prompt, until you reach the end of the list cointained in requirements.txt.

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

(In case your X is psycopg2, substitute it with psycopg2-binary).

通过安装和运行 pip-chill

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


注意:这是一个最后的资源解决方案,因此,在实施之前,请按照这个答案


Note: this is a last-resource solution, so, before implementing it, see if you can solve the problem by following the instructions of this answer

这篇关于Heroku 上传 - 找不到满足 anaconda-client==1.4.0 要求的版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆