Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/285.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python不能被推送到Heroku_Python_Django_Heroku - Fatal编程技术网

Python不能被推送到Heroku

Python不能被推送到Heroku,python,django,heroku,Python,Django,Heroku,我尝试将Django应用程序部署到Heroku,但推送被拒绝。结果显示:Push被拒绝,未能编译Python应用程序。从错误脚本中,似乎找不到模型“ConfigParser” 我用谷歌搜索了这个问题,似乎另一个人也有这个问题()。Python 3.7真的不能在Heroku中工作吗?我该如何处理它?下面是一些详细的命令结果脚本: remote: Collecting views==0.3 (from -r /tmp/build_ed5220ea80c3d6e758ae010

我尝试将Django应用程序部署到Heroku,但推送被拒绝。结果显示:Push被拒绝,未能编译Python应用程序。从错误脚本中,似乎找不到模型“ConfigParser”

我用谷歌搜索了这个问题,似乎另一个人也有这个问题()。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'

这是否可能是模块
ConfigParser
导入时出现python3导入错误

我希望这有帮助

这是:

在Python 3中,已重命名为,以符合PEP 8的要求。看起来您正在安装的软件包不支持Python 3


这是否可能是模块
ConfigParser
导入时出现python3导入错误

我希望这有帮助

这是:

在Python 3中,已重命名为,以符合PEP 8的要求。看起来您正在安装的软件包不支持Python 3


Thx.那么我该如何处理它呢?我想最简单的方法是
pip安装configparser
,然后通过
pip卸载configparser&&pip freeze>requirements.txt
从需求中删除前一个
configparser
。试试看这是否有效当我推到heroku时它仍然不起作用。我应该这样做吗基于以下stricpt?remote:File“/tmp/pip-build-t_7e9for/MySQL python/setup_posix.py的me更改“,第2行,在远程:从ConfigParser导入安全ConfigParser远程:ModuleNotFoundError:没有名为'ConfigParser'的模块我应该删除MySQL python吗?”?像pip卸载MySQL python一样?实际上,尝试其中一种
pip安装configparser
pip3安装configparser
如果这些都不起作用,请尝试
pip安装configparser
pip3安装configparser
。此外,如果您认为我的答案足够,请选择它作为最佳答案。Thx。那么我该如何处理它呢?我认为最简单的方法是通过
pip uninstall configparser&&pip freeze>requirements.txt从需求中删除前一个
configparser
。试着看看这是否有效当我推到heroku时,它仍然不起作用。我是否应该根据以下标准进行一些更改?远程:文件“/tmp/pip-build-t_7e9for/MySQL-python/setup_posix.py”,第2行,在远程:从ConfigParser导入安全ConfigParser远程:ModuleNotFoundError:没有名为'ConfigParser'的模块我应该删除MySQL python吗?像pip卸载MySQL python一样?实际上,尝试其中一种
pip安装configparser
pip3安装configparser
如果这些都不起作用,请尝试
pip安装configparser
pip3安装configparser
。此外,如果您认为我的答案足够,请选择它作为最佳答案。
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