Python3.3 安装 MySQLdb(Ubuntu13.04)

来源:互联网 发布:网络传送带使用教程 编辑:程序博客网 时间:2024/06/05 17:15

软件环境: Ubuntu13.04 + Python3.3


说明:最新的Ubuntu13.04已经包括了Python的最新版本,我自行更新到了3.3版本

1. 从github上 下载 MySQL-for-Python-3:

 

 git clone https://github.com/davispuh/MySQL-for-Python-3.git cd MySQL-for-Python-3 sudo python3 setup.py install

2. 安装过程中可能出现的错误:

 2.1: mysql_config not found

     执行: 

sudo apt-get install libmysqlclient15-dev 

然后执行1的操作

 2.2: Python.h 没有这个文件

     执行: 

sudo apt-get install python3-dev 

然后执行1的操作

原创粉丝点击