mysql项目推送到heroku

3qpi33ja  于 2021-06-20  发布在  Mysql
关注(0)|答案(0)|浏览(274)

我尝试将python项目(python3.7.0)推送到heroku。这是一个django项目,链接了mysql数据库。但它始终显示错误:modulenotfounderror:没有名为'configparser'的模块。从前面别人推荐的答案来看,在python3中,我似乎需要安装mysqlclient而不是mysql python,mysql python是python2版本的。但我已经安装了这样的。是图书馆的问题吗?推送到heroku的错误如下所示。很抱歉,如果我还是python的大一新生的话,我就傻了。

remote:              File "/tmp/pip-build-1fjjz1dy/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 /tmp/pip-build-1fjjz1dy/MySQL-python/
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to fathomless-citadel-89649.

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
configparser==3.5.0
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
virtualenv==16.0.0
w3lib==1.19.0
Werkzeug==0.14.1
zope.interface==4.5.0
psycopg2>=2.6.1

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题