Ubuntu16.04安装Scrapy(pip install Scrapy)时提示错误如下:

Failed building wheel for cryptography
Running setup.py clean for cryptography
Failed to build cryptography error: command 'x86_64-linux-gnu-gcc' failed with exit status ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-2wwgqS/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-IPpc2q-record/install-record.txt --single-version-externally-managed --compile" failed with error code in /tmp/pip-build-2wwgqS/cryptography/

解决办法,参考:http://stackoverflow.com/questions/22073516/failed-to-install-python-cryptography-package-with-pip-and-setup-py

On Windows

If you’re on Windows you’ll need to make sure you have OpenSSL installed. There are pre-compiled binaries available. If your installation is in an unusual location set the LIB and INCLUDE environment variables to include the corresponding locations. For example:

C:\> \path\to\vcvarsall.bat x86_amd64
C:\> set LIB=C:\OpenSSL-1.0.1f-64bit\lib;%LIB%
C:\> set INCLUDE=C:\OpenSSL-1.0.1f-64bit\include;%INCLUDE%
C:\> pip install cryptography

Building cryptography on Linux

cryptography should build very easily on Linux provided you have a C compiler, headers for Python (if you’re not using pypy), and headers for the OpenSSL and libffi libraries available on your system.

For Debian and Ubuntu, the following command will ensure that the required dependencies are installed:

sudo apt-get install build-essential libssl-dev libffi-dev python-dev

For Fedora and RHEL-derivatives, the following command will ensure that the required dependencies are installed:

sudo yum install gcc libffi-devel python-devel openssl-devel

You should now be able to build and install cryptography with the usual.

pip install cryptography

最新文章

  1. 三言两语之简单上手sass
  2. Linux 的文本处理命令一览
  3. hdu 1503, LCS variants, find a LCS, not just the length, backtrack to find LCS, no extra markup 分类: hdoj 2015-07-18 16:24 139人阅读 评论(0) 收藏
  4. jquery之css操作
  5. 使用DOM动态创建标签
  6. JS精粹:下半部分
  7. Spark Streaming实时计算框架介绍
  8. [BZOJ 2631]tree
  9. 火狐firefox提示“内容编码错误 无法显示您尝试查看的页面,因为它使用了无效或者不支持的压缩格式。”
  10. (转)关于rdlc报表的数据源
  11. request对象
  12. 手工走一次OPENSTACK安装,掉一层皮啊
  13. 手势触摸定位(UIPanGestureRecognizer)
  14. JS实现购物车特效
  15. VisualStudio2010配置OpenCV的一种一劳永逸的方法
  16. 【翻译】Sencha Ext JS 5发布
  17. Flex很难?一文就足够了
  18. openlayers4 入门开发系列之地图模态层篇(附源码下载)
  19. cocos 场景制作流程
  20. Confluence 6 空间

热门文章

  1. iOS 自定义键盘ToolBar(与键盘的弹出、收起保持一致)
  2. ubuntu不能正常登录
  3. iOS 面试题(二):什么时候在 block 中不需要使用 weakSelf --转自唐巧
  4. React Native IOS源码初探
  5. 用jsonp格式的数据进行ajax post请求变成get
  6. ReactiveX编程范式
  7. 今年暑假不AC
  8. FreeBSD 查看硬件信息
  9. 误用的volatile
  10. 机器学习实战4:Adaboost提升:病马实例+非均衡分类问题