简单几步配置mysql-python环境

2017-01-10 19:23:40来源:作者:人点击

系统:Centos7
版本:Python2.7
先配置Percona
wget https://www.percona.com/redir/downloads/percona-release/redhat/latest/percona-release-0.1-4.noarch.rpm rpm -ivh percona-release-0.1-4.noarch.rpmyum install Percona-Server-server-56.x86_64
配置pip
yum install python-pip -y
更新pip
pip install --upgrade pip
安装MySQLdb模块

pip install mysql-python
报错:Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-JRdBT6/mysql-python/
解决:
yum install mysql-devel python-devel -y
然后再使用
pip install mysql-python
Collecting mysql-python
Using cached MySQL-python-1.2.5.zip
Installing collected packages: mysql-python
Running setup.py install for mysql-python ... done
Successfully installed mysql-python-1.2.5
安装成功。

本文出自 “牛掰的技术博客” 博客,请务必保留此出处http://newbye.blog.51cto.com/5197506/1890731

最新文章

123

最新摄影

微信扫一扫

第七城市微信公众平台