我已经尝试过sudo pip install MySQL-python
我在Mac 10.14上安装了python 3和python 2
而且我不断收到此错误:
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-00klz8kk/mysql-python/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-00klz8kk/mysql-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/tmp/pip-pip-egg-info-98ox2mo0
cwd: /private/tmp/pip-install-00klz8kk/mysql-python/
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-install-00klz8kk/mysql-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/private/tmp/pip-install-00klz8kk/mysql-python/setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
答案 0 :(得分:0)
尝试安装以下相同的内容,
pip install pymysql
pip install mysql-connector
pip intsall mysql-connector-python