安装python mysql(MySQLdb)驱动失败 No module named 'ConfigParser'
我新建的pyhton3 的 虚拟环境 python 的版本是python3.4
因为需要 安装 SQLAlchemy 但是我pip install 后 提示 需要安装MySQLdb 然后 我 pip isntall mysql-python 一下 有报错
Collecting mysql-python
Using cached MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-9vtb85ke/mysql-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/tmp/pip-build-9vtb85ke/mysql-python/setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-9vtb85ke/mysql-python/
然后我 接着 安装 pip install ConfigParser 后
Requirement already satisfied (use --upgrade to upgrade): ConfigParser in /home/chenglong/pytest/flaskenv/lib/python3.4/site-packages
(flaskenv) chenglong@iZuf6fn1rjw3rff1afi0itZ:~/pytest/flasktest$ pip install mysql-python
Collecting mysql-python
Using cached MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-ny69mdyx/mysql-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/tmp/pip-build-ny69mdyx/mysql-python/setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
还是 No module named 'ConfigParser'