Ubuntu下安装scrapy遇到的问题及解决过程

在使用 pip install scrapy 来安装scrapy时,遇到以下输出:

Collecting cffi>=1.4.1 (from cryptography>=1.3.4->pyOpenSSL->scrapy)
  Downloading cffi-1.8.3-cp27-cp27mu-manylinux1_x86_64.whl (386kB)
    100% |████████████████████████████████| 389kB 454kB/s 
Collecting pycparser (from cffi>=1.4.1->cryptography>=1.3.4->pyOpenSSL->scrapy)
  Downloading pycparser-2.14.tar.gz (223kB)
    100% |████████████████████████████████| 225kB 609kB/s 
Building wheels for collected packages: Twisted, PyDispatcher, cryptography, zope.interface, pycparser
  Running setup.py bdist_wheel for Twisted ... done
  Stored in directory: /home/shiva/.cache/pip/wheels/0e/53/62/e7b4cea7df9113fb2818b224eb5d143be981568d9c43057a0a
  Running setup.py bdist_wheel for PyDispatcher ... done
  Stored in directory: /home/shiva/.cache/pip/wheels/86/02/a1/5857c77600a28813aaf0f66d4e4568f50c9f133277a4122411
  Running setup.py bdist_wheel for cryptography ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-UDAHL4/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))

可以看到是在安装cryptography时出的问题,报错信息为:

build/temp.linux-x86_64-2.7/_openssl.c:433:30: fatal error: openssl/opensslv.h: 没有那个文件或目录

于是又可以追踪到是openssl的问题,通过百度安装过程,发现执行以下命令:

apt-get install libssl-dev

即可解决报错问题。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值