错误:无法将某些引用推送到“ https://git.heroku.com/xxxxxxxxx.git”

时间:2018-06-23 08:05:19

标签: django git heroku

我遇到了一个错误,错误:无法将一些引用推送到“ https://git.heroku.com/xxxxxxxxx.git”。我想将我的应用程序Django制成的上传到heroku。我运行heroku create xxxxxxxxx。然后我运行git push heroku,所以

Counting objects: 6951, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5952/5952), done.
Writing objects: 100% (6951/6951), 11.21 MiB | 891.00 KiB/s, done.
Total 6951 (delta 2087), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Python app detected
remote:  !     The latest version of Python 3 is python-3.6.5 (you are using python-3.6.4, which is unsupported).
remote:  !     We recommend upgrading by specifying the latest version (python-3.6.5).
remote:        Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing python-3.6.4
remote: -----> Installing pip
remote: -----> Installing requirements with pip
remote:        Collecting alabaster==0.7.10 (from -r /tmp/build_6adefb27873345001cb4512d3fd963e3/requirements.txt (line 1))
remote:          Downloading https://files.pythonhosted.org/packages/2e/c3/9b7dcd8548cf2c00531763ba154e524af575e8f36701bacfe5bcadc67440/alabaster-0.7.10-py2.py3-none-any.whl
remote:        Collecting anaconda-client==1.6.9 (from -r /tmp/build_6adefb27873345001cb4512d3fd963e3/requirements.txt (line 2))
remote:          Could not find a version that satisfies the requirement anaconda-client==1.6.9 (from -r /tmp/build_6adefb27873345001cb4512d3fd963e3/requirements.txt (line 2)) (from versions: 1.1.1, 1.2.2)
remote:        No matching distribution found for anaconda-client==1.6.9 (from -r /tmp/build_6adefb27873345001cb4512d3fd963e3/requirements.txt (line 2))
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to xxxxxxxxx.
remote: 
To https://git.heroku.com/xxxxxxxxx.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/xxxxxxxxx.git'

我搜索了此错误,也许应该安装conda install pip命令。所以我再次运行它,然后再次运行heroku create命令,但同样的错误也会发生。怎么了?我该如何解决?

1 个答案:

答案 0 :(得分:1)

该错误告诉您它无法安装anaconda-client,因为它找不到您在requirements.txt中指定的1.6.9版本。 PyPi上该库的最新版本为version 1.2.2。但是,它似乎已被放弃-为什么要完全指定它?你用它做什么?

相关问题