#异常# how to “pip install MySQLdb”
问题
how to “pip install MySQLdb”
解决
1、
1 2 3 4 5 6 7 8 9 10 |
# 一、Ubuntu 14, Ubuntu 16, Debian 8.6 (jessie) sudo apt-get install python-pip python-dev libmysqlclient-dev # 如果找不到libmysqlclient-dev尝试如下, 再找不到 apt search sudo apt-get install default-libmysqlclient-dev # 二、Fedora 24 sudo dnf install python python-devel mysql-devel redhat-rpm-config gcc # 三、Mac OS brew install mysql-connector-c # if that fails, try brew install mysql |
2、
1 |
sudo pip install MySQL-python |
转载地址:https://stackoverflow.com/questions/25865270/how-to-install-python-mysqldb-module-using-pip