Heroku在安装pip要求时失败

2024-04-26 18:03:42 发布

您现在位置:Python中文网/ 问答频道 /正文

在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总是在setuptools中使用pip的最新版本。在

有人知道如何在heroku上调试这个吗?heroku文档没有对此做任何说明,stackoverflow已经打开的关于这个问题的问题是不完整的,并且没有很好的文档记录。在


Tags: piptodjangofrominfoappherokuremote
2条回答

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

在我知道如何无错误地回到3.6.4版本之前,我不会回答这个问题。在

对我来说,在runtime.txtpython-3.6.4->;python-3.6.3->;python-3.6.4中进行更改非常有帮助,并以单独的推送方式发送它。在

相关问题 更多 >