1.安装pandas模块报错
然后查看系统信息,如下:
报错信息如下:
报错信息很明显,说缺依赖包,然后用pip和easy_install安装python-dev和python-devel都不成功,没办法,自己下载了一个python-devel-2.7.5-34.el7.x86_64.rpm安装,
安装命令:
安装成功了。然后安装pandas又报错:
最后谷歌搜索错误提示说应该是g++没有安装,然后搜索g++:
安装gcc-c++:yum install gcc-c++,成功后安装pandas也就成功了。
如果最后还是不成功,则yum -y install mysql-devel libxml2 libxml2-dev libxslt* zlib gcc openssl
2.安装MySQLdb模块报错
如果有如下报错:EnvironmentError: mysql_config not found
需要apt-get install libmysqlclient-dev && updatedb && locate mysql_config(ubuntu系统),如果是centos系统请执行yum install mysql-devel
如果还有报错:_mysql.c:29:20: fatal error: Python.h: No such file or directory error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
需要apt-get install python-dev(ubuntu系统),如果是centos,如果不清楚到底缺什么包就把下面的都安装一遍:
yum install gcc-c++ python-devel mysql-devel zlib-devel openssl-devel
通过上述两步,基本就安装MySQLdb成功了。
3.安装ipython报错:unable to execute gcc: No such file or directory error: command 'gcc' failed with exit status 1
解决方法:yum install gcc
如果是如下报错:fatal error: Python.h: No such file or directory error: command 'gcc' failed with exit status 1
解决方法:yum install python-devel(centos),如果是ubuntu,apt-get install python-dev