正文
Centos/Fedora下安装Twisted,failed with error code 1 in /tmp/pip-build-H1bj8E/twisted/解决方法
小程序:扫一扫查出行
【扫一扫了解最新限行尾号】
复制小程序
【扫一扫了解最新限行尾号】
复制小程序
Python踩坑之路
pip/easy_install无法安装Twisted或者安装后无法导入Twisted
看到MM网站上很多图,想用Scrapy框架爬点图,遇到各种库的问题,蛋疼。
一直twisted安装不上,总是报错failed with error code 1 in /tmp/pip-build-H1bj8E/twisted/ 好奇,不就想下个图么。pip和easy_install老是报错,只好试试源码安装了。
-
更新系统
yum update
-
安装Twisted依赖关系包
yum install wget python-devel python-zope-interface
-
安装开发环境工具
yum group install 'development tools'
-
Twisted官网下载最新版本安装
wget http://twistedmatrix.com/Releases/Twisted/17.5/Twisted-17.5.0.tar.bz2
-
解压安装
tar -jxvf Twisted-17.5.0.tar.bz2
cd Twisted-17.5.0
python setup.py install
无奈,只好死马当活马医。