Python可以不推的Heroku

问题描述 投票:0回答:1

我尝试部署Django应用程序来的Heroku和推遭到拒绝。结果表明:按拒绝,无法编译Python应用程序。从错误的脚本,似乎模型“ConfigParser”没有找到。

我谷歌这个问题,似乎其他人也有这个问题(https://github.com/hashedin/squealy/issues/229)。这是真的,Python的3.7不能在Heroku的工作吗?我怎么能处理呢?详细的命令结果脚本的某些部分是如下:

remote:        Collecting views==0.3 (from -r /tmp/build_ed5220ea80c3d6e758ae010                                                                                            6d17c8450/requirements.txt (line 54))
remote:          Downloading https://files.pythonhosted.org/packages/1b/d9/5598d                                                                                            590f9467c364704397cbb0ebc9b33481b84e947c2af31cc1dc9fa11/views-0.3.tar.gz
remote:        Collecting w3lib==1.19.0 (from -r /tmp/build_ed5220ea80c3d6e758ae                                                                                            0106d17c8450/requirements.txt (line 55))
remote:          Downloading https://files.pythonhosted.org/packages/37/94/40c93                                                                                            ad0cadac0f8cb729e1668823c71532fd4a7361b141aec535acb68e3/w3lib-1.19.0-py2.py3-non                                                                                            e-any.whl
remote:        Collecting Werkzeug==0.14.1 (from -r /tmp/build_ed5220ea80c3d6e75                                                                                            8ae0106d17c8450/requirements.txt (line 56))
remote:          Downloading https://files.pythonhosted.org/packages/20/c4/12e3e                                                                                            56473e52375aa29c4764e70d1b8f3efa6682bef8d0aae04fe335243/Werkzeug-0.14.1-py2.py3-                                                                                            none-any.whl (322kB)
remote:        Collecting zope.interface==4.5.0 (from -r /tmp/build_ed5220ea80c3                                                                                            d6e758ae0106d17c8450/requirements.txt (line 57))
remote:          Downloading https://files.pythonhosted.org/packages/ac/8a/65753                                                                                            2df378c2cd2a1fe6b12be3b4097521570769d4852ec02c24bd3594e/zope.interface-4.5.0.tar                                                                                            .gz (151kB)
remote:        Collecting psycopg2>=2.6.1 (from -r /tmp/build_ed5220ea80c3d6e758                                                                                            ae0106d17c8450/requirements.txt (line 58))
remote:          Downloading https://files.pythonhosted.org/packages/37/88/40748                                                                                            331bf75d068a07bbea7dc658faceb0ce2e9fffdde550e76d5475e59/psycopg2-2.7.5-cp37-cp37                                                                                            m-manylinux1_x86_64.whl (2.7MB)
remote:        Collecting MySQL-python (from mysql==0.0.1->-r /tmp/build_ed5220e                                                                                            a80c3d6e758ae0106d17c8450/requirements.txt (line 31))
remote:          Downloading https://files.pythonhosted.org/packages/a5/e9/51b54                                                                                            4da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip (                                                                                            108kB)
remote:            Complete output from command python setup.py egg_info:
remote:            Traceback (most recent call last):
remote:              File "<string>", line 1, in <module>
remote:              File "/tmp/pip-build-t_7e9for/MySQL-python/setup.py", line                                                                                             13, in <module>
remote:                from setup_posix import get_config
remote:              File "/tmp/pip-build-t_7e9for/MySQL-python/setup_posix.py",                                                                                             line 2, in <module>
remote:                from ConfigParser import SafeConfigParser
remote:            ModuleNotFoundError: No module named 'ConfigParser'
remote:
remote:            ----------------------------------------
remote:        Command "python setup.py egg_info" failed with error code 1 in /t                                                                                            mp/pip-build-t_7e9for/MySQL-python/
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to damp-brook-61138.
remote:
To https://git.heroku.com/damp-brook-61138.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/damp-brook-61138.git'

该requirements.txt是:

asn1crypto==0.24.0
attrs==18.1.0
auth==0.5.3
Automat==0.7.0
beautifulsoup4==4.6.1
blinker==1.4
bs4==0.0.1
certifi==2018.4.16
cffi==1.11.5
chardet==3.0.4
constantly==15.1.0
cryptography==2.3
cssselect==1.0.3
dj-database-url==0.5.0
dj-static==0.0.6
Django==2.1
django-bootstrap3==10.0.1
django-forms-bootstrap==3.1.0
dnspython==1.15.0
eventlet==0.24.1
falcon==1.4.1
greenlet==0.4.14
gunicorn==19.9.0
hyperlink==18.0.0
idna==2.7
incremental==17.5.0
lxml==4.2.4
misaka==2.1.0
mongoengine==0.15.3
monotonic==1.5
mysql==0.0.1
mysql-connector==2.1.6
mysqlclient==1.3.13
parsel==1.5.0
pyasn1==0.4.4
pyasn1-modules==0.2.2
pycparser==2.18
PyDispatcher==2.0.5
PyHamcrest==1.9.0
pymongo==3.7.1
PyMySQL==0.9.2
pyOpenSSL==18.0.0
python-mimeparse==1.6.0
pytz==2018.5
queuelib==1.5.0
requests==2.19.1
Scrapy==1.5.1
service-identity==17.0.0
six==1.11.0
static3==0.7.0
Twisted==18.7.0
typed-ast==1.1.0
urllib3==1.23
views==0.3
w3lib==1.19.0
Werkzeug==0.14.1
zope.interface==4.5.0
psycopg2>=2.6.1
python django heroku
1个回答
2
投票

任何机会,这可能是对进口的模块ConfigParser一个python3导入错误?

我希望这有帮助。

这是Abe Karplus's answer

在Python 3,ConfigParser已更名为configparser为PEP 8合规性。它看起来像您正在安装不支持Python 3的软件包。

© www.soinside.com 2019 - 2024. All rights reserved.