我尝试将Python项目(Python 3.7.0)推送到Heroku。这是一个与mysql数据库链接的django项目。但是它始终显示错误:ModuleNotFoundError:没有名为“ ConfigParser”的模块。从其他人推荐的先前答案中,似乎在python 3中,我需要安装mysqlclient而不是适用于python 2版本的mysql-python。但是我已经安装了。关于图书馆有问题吗?推送到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