由于点子冻结(包括所有anaconda软件包),导致heroku部署出现问题

时间:2018-09-30 18:35:06

标签: python heroku anaconda

在遵循Heroku Getting Started on Heroku with Python指南之后,我决定尝试部署自己的项目,但是遇到了以下问题。

我正在使用 Pycharm Anaconda 。使用pandas创建一个简单的应用程序后,我在项目的根目录中执行以下操作:

pip freeze --local > requirements.txt

然后我提交requirements.txt并尝试部署该应用。

git push heroku master

错误

remote: -----> Installing requirements with pip
remote:        Collecting alabaster==0.7.10 (from -r /tmp/build_ee6cf004d0fea807fae99f551ec45276/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.14 (from -r /tmp/build_ee6cf004d0fea807fae99f551ec45276/requirements.txt (line 2))
remote:          Could not find a version that satisfies the requirement anaconda-client==1.6.14 (from -r /tmp/build_ee6cf004d0fea807fae99f551ec45276/requirements.txt (line 2)) (from versions: 1.1.1, 1.2.2)
remote:        No matching distribution found for anaconda-client==1.6.14 (from -r /tmp/build_ee6cf004d0fea807fae99f551ec45276/requirements.txt (line 2))
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to fish-finger-23765.
remote: 
To https://git.heroku.com/fish-finger-23765.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/fish-finger-23765.git'

在阅读this之后,似乎可以解决的方法是手动创建requirements.txt,在我的情况下,这需要添加pandas==0.23.0,但这似乎是一种技巧-您如何成功创建一个requirements.txt可以成功部署到 Heroku 吗?

1 个答案:

答案 0 :(得分:0)

嗯....根据PyPi,最高版本是1.2.2,这是有问题的。

我在github仓库上看到的版本是1.6.14。您可以更新需求文件以直接从GitHub安装该软件包。

相关问题