首页 文章

无法在centos Python2.7上安装MysqlDB

提问于
浏览
4

我有个问题 . 我不能安装MysqlDB .

操作系统:CentOs6.8 x64 Python:2.7.6

pip2.7 install mysql-python

pip install mysql-python

这是我的错误:

命令“/usr/local/bin/python2.7 -u -c”import setuptools,tokenize; file ='/ tmp / pip-build-rgqmTQ / mysql-python / setup.py'; f = getattr(tokenize, 'open',open)(file); code = f.read() . replace('\ r \ n','\ n'); f.close(); exec(compile(code,file,'exec') ))“安装--record /tmp/pip-G4kWRa-record/install-record.txt --single-version-external-managed --compile”失败,错误代码为1 / tmp / pip-build-rgqmTQ / mysql -蟒蛇/

1 回答

  • 4

    试试这个dind.biz

    # yum install python-devel mysql-devel
    
    # pip install mysql-python
    

相关问题