因为重装了系统 要重新配环境 然而今天用pip安装包的时候 又出现了之前总是出现的报错问题:
报错:
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
解决方案:
sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev
sudo easy_install greenlet
sudo easy_install gevent
我是安的lxml这个包,这个包有依赖 要这样安:
(原谅我头晕有点难受,然后就简单说一下然后贴代码了)
所有解决方案均来自于 stack overflow
sudo apt-get install libxml2-dev libxslt1-dev python-dev
sudo
apt-get install python-lxml