您的位置:首页 > 编程语言 > Python开发

缺少MySQLdb 模块,pip install MySQL-python 异常

2017-11-13 16:25 761 查看
直接使用pip install MySQL-python,报了下面的错:
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb.
Did you install mysqlclient or MySQL-python?

发现原来是pip 无法识别系统是多少位的(win果然不怎么爽)
后来下载了

MySQL_python‑1.2.5‑cp27‑none‑win_amd64.whl

pip install MySQL_python-1.2.5-cp27-none-win_amd64.whl

MySQL_python-1.2.5-cp27-none-win_amd64.whl is not a supported wheel on this platform.

安装wheel:pip instal 
继续安装:

 pip install MySQL_python-1.2.5-cp27-none-win_amd64.whl
MySQL_python-1.2.5-cp27-none-win_amd64.whl is not a supported wheel on this platform.

还有错,真的是问题一大堆啊(主要还是不了解),后来发现原来我的python装的是32位的,喷血(电脑是64位的)

好吧,再去下载一个32位的MySQL-python
http://download.csdn.net/download/u011671022/10116616

pip install MySQL_python-1.2.5-cp27-none-win32.whl
Processing c:\users\luzhiwei\downloads\mysql_python-1.2.5-cp27-none-win32.whl
Installing collected packages: MySQL-python
Successfully installed MySQL-python-1.2.5

好了,终于安装好了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  python MySQLdb