Heroku因安装pip要求失败

时间:2018-03-20 14:52:29

标签: python heroku pip setuptools

在Heroku中发生了一些非常奇怪的事情,我通常在我做一个git push heroku master时安装我的软件包,但是现在几个月来我工作的东西已经不再用了。

这是错误:

remote: -----> Python app detected
remote: -----> Installing pip
remote: -----> Installing requirements with pip
remote:        Obtaining django-widget-tweaks from git+https://github.com/julianogouveia/django-widget-tweaks/#egg=django-widget-tweaks (from -r /tmp/build_843fc05109f047351641f1b9e1db069d/requirements.txt (line 2))
remote:          Cloning https://github.com/julianogouveia/django-widget-tweaks/ to /app/.heroku/src/django-widget-tweaks
remote:            Complete output from command python setup.py egg_info:
remote:            usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
remote:               or: -c --help [cmd1 cmd2 ...]
remote:               or: -c --help-commands
remote:               or: -c cmd --help
remote:            
remote:            error: invalid command 'egg_info'
remote:            
remote:            ----------------------------------------
remote:        Command "python setup.py egg_info" failed with error code 1 in /app/.heroku/src/django-widget-tweaks/
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to partnersbit-prod.

更疯狂的是egg_info错误是一个setuptools pip错误,而heroku总是使用最后一个版本的pip和setuptools。

有人想知道如何在heroku上开始调试吗? heroku文档没有说明这一点,并且已经打开的stackoverflow问题是关于这个问题是不完整的,没有详细记录。

2 个答案:

答案 0 :(得分:2)

似乎Heroku在python-3.6.4运行时进行了一些增强,这导致了egg_info错误。我现在解决了,将python运行时版本从3.6.4更改为3.6.3版本。

在我知道如何回到3.6.4版本而没有错误之前,我不会关闭这个问题。

答案 1 :(得分:1)

对我来说,在runtime.txt python-3.6.4中更改是非常有用的 - > python-3.6.3 - > python-3.6.4并单独发送它。

相关问题