Ubuntu下sudo pip install scrapy失败
Ubuntu安装scrapy时遇到如下错误信息
'''
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/Twisted/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('rn', 'n'), __file__, 'exec'))" install --record /tmp/pip-UF7S_L-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/Twisted
'''
whereis python 得到如下信息:
'''
python: /usr/bin/python3.4m-config /usr/bin/python3.4-config /usr/bin/python2.7 /usr/bin/python /usr/bin/python3.4 /usr/bin/python3.4m /etc/python2.7 /etc/python /etc/python3.4 /usr/lib/python2.7 /usr/lib/python3.4 /usr/bin/X11/python3.4m-config /usr/bin/X11/python3.4-config /usr/bin/X11/python2.7 /usr/bin/X11/python /usr/bin/X11/python3.4 /usr/bin/X11/python3.4m /usr/local/lib/python2.7 /usr/local/lib/python3.4 /usr/include/python2.7 /usr/include/python3.4 /usr/include/python3.4m /usr/share/python /usr/share/man/man1/python.1.gz
'''
阿里云主机 linux 64,安装结果
'''
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-wHx9hd/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('rn', 'n'), __file__, 'exec'))" install --record /tmp/pip-JluKSf-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-wHx9hd/cffi/
'''
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在虚拟环境下安装吧,例如virtualenv
ubuntu由于自带而且默认使用python2.7的原因,如果多版本存在的话总是会有点问题。
不想的话可以尝试安装
如果没记错的话,scrapy不支持python 3.x