我试图在Mac OS的python2.7中运行scrapy命令:
cmdline.execute("scrapy crawl pornHubSpider".split())
但我收到这个错误:
from OpenSSL._util import lib as pyOpenSSLlib
ImportError: No module named _util
当我尝试安装时
sudo pip install pyopenssl --user --upgrade
我得到:
build/temp.macosx-10.13-intel-2.7/_openssl.c:493:10: fatal error: 'openssl/opensslv.h' file not found
#include <openssl/opensslv.h>
^~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command 'cc' failed with exit status 1
----------------------------------------
Command "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-v_oSaa/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-A590v3-record/install-record.txt --single-version-externally-managed --compile --user" failed with error code 1 in /private/tmp/pip-build-v_oSaa/cryptography
我怎么修这个?