在尝试使用pip安装mysql-python时遇到ModuleNotFoundError:No module named 'ConfigParser'的问题。原因是Python 3.x中,ConfigParser模块已被重命名为configparser。解决方案是将代码中的ConfigParser.py替换为configparser.py,然后重新安装即可成功。
摘要由CSDN通过智能技术生成
报错信息:
~sudo pip3 install mysql-python
Password:
WARNING: The directory '/Users/tangbincheng/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting mysql-python
Downloading MySQL-python-1.2.5.zip (108 kB)
|████████████████████████████████| 108 kB 20 kB/s
ERROR: Command errored out with exit status 1:
command: /Users/tangbincheng/.pyenv/versions/3.6.0/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0]