【问题标题】:error: failed to push some refs to 'https://git.heroku.com/xxxxxxxxx.git'错误:未能将一些引用推送到“https://git.heroku.com/xxxxxxxxx.git”
【发布时间】:2018-06-23 08:05:19
【问题描述】:

我收到一个错误,错误:未能将一些引用推送到“https://git.heroku.com/xxxxxxxxx.git”。我想将我的应用程序上传到 Django。我运行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命令,但出现同样的错误。出了什么问题?我应该如何解决这个问题?

【问题讨论】:

    标签: django git heroku


    【解决方案1】:

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

    【讨论】:

    • 我从 requirements.txt 中删除了 anaconda-client 。然后我再次运行git push heroku master 命令,我该如何放弃呢?
    • 我不明白你的问题。放弃什么?您是否提交了更改?
    • 我从 requirements.txt 中放弃了 anaconda-client。是的,我提交了我的更改。
    猜你喜欢
    • 1970-01-01
    • 2021-09-15
    • 1970-01-01
    • 2020-12-30
    • 2020-11-26
    • 2023-03-30
    • 2021-04-16
    • 1970-01-01
    • 2020-07-29
    相关资源
    最近更新 更多