在OS X上的virtualenv中安装scrapy的加密时发生错误 [英] error occurs when installing cryptography for scrapy in virtualenv on OS X

查看:262
本文介绍了在OS X上的virtualenv中安装scrapy的加密时发生错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在OS X 10.11上的virtualenv中安装了pip。

当安装加密时,它说:

I was installing scrapy with pip in virtualenv on OS X 10.11.
When it's installing cryptography, it said:

    building '_openssl' extension
    cc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c build/temp.macosx-10.11-intel-2.7/_openssl.c -o build/temp.macosx-10.11-intel-2.7/build/temp.macosx-10.11-intel-2.7/_openssl.o
    build/temp.macosx-10.11-intel-2.7/_openssl.c:423:10: fatal error: 'openssl/e_os2.h' file not found
    #include <openssl/e_os2.h>
         ^
    1 error generated.
    error: command 'cc' failed with exit status 1

    ----------------------------------------
Command "/Users/Kris/Workspace/env/scrapy/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/wx/jm7lxhps3n7484zl4gv9s3180000gn/T/pip-build-2rJYgI/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/wx/jm7lxhps3n7484zl4gv9s3180000gn/T/pip-nXp2mE-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/Kris/Workspace/env/scrapy/include/site/python2.7/cryptography" failed with error code 1 in /private/var/folders/wx/jm7lxhps3n7484zl4gv9s3180000gn/T/pip-build-2rJYgI/cryptography

有什么建议可以帮助我解决这个问题吗?

BTW,当我安装scrapy没有virtualenv,一切都很好。

Any suggestions that could help me fix it?
BTW, when I was installing scrapy without virtualenv, everything went well.

推荐答案

pip install --upgrade pip

可以帮助

这篇关于在OS X上的virtualenv中安装scrapy的加密时发生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆