0
在OSX 10.8,蟒蛇2.7.12,OpenSSL的0.9.8zg,我安裝的命令行工具,然後安裝使用 「PIP安裝scrapy」Scrapy startproject命令錯誤 - Python的
我嘗試運行 「scrapy startproject命令教程」 scrapy和它給了我這個錯誤:
Traceback (most recent call last):
File "/Users/Jack/test_virtual_environment_for_python/bin/scrapy", line 11, in <module>
sys.exit(execute())
File "/Users/Jack/test_virtual_environment_for_python/lib/python2.7/site-packages/scrapy/cmdline.py", line 121, in execute
cmds = _get_commands_dict(settings, inproject)
File "/Users/Jack/test_virtual_environment_for_python/lib/python2.7/site-packages/scrapy/cmdline.py", line 45, in _get_commands_dict
cmds = _get_commands_from_module('scrapy.commands', inproject)
File "/Users/Jack/test_virtual_environment_for_python/lib/python2.7/site-packages/scrapy/cmdline.py", line 28, in _get_commands_from_module
for cmd in _iter_command_classes(module):
File "/Users/Jack/test_virtual_environment_for_python/lib/python2.7/site-packages/scrapy/cmdline.py", line 19, in _iter_command_classes
for module in walk_modules(module_name):
File "/Users/Jack/test_virtual_environment_for_python/lib/python2.7/site-packages/scrapy/utils/misc.py", line 71, in walk_modules
submod = import_module(fullpath)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/Users/Jack/test_virtual_environment_for_python/lib/python2.7/site-packages/scrapy/commands/version.py", line 6, in <module>
import OpenSSL
File "/Users/Jack/test_virtual_environment_for_python/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/Users/Jack/test_virtual_environment_for_python/lib/python2.7/site-packages/OpenSSL/rand.py", line 12, in <module>
from OpenSSL._util import (
File "/Users/Jack/test_virtual_environment_for_python/lib/python2.7/site-packages/OpenSSL/_util.py", line 6, in <module>
from cryptography.hazmat.bindings.openssl.binding import Binding
File "/Users/Jack/test_virtual_environment_for_python/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 14, in <module>
from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: dynamic module does not define init function (init_openssl)
PIP凍結:
attrs==16.2.0
cffi==1.8.3
cryptography==1.5.2
cssselect==1.0.0
enum34==1.1.6
idna==2.1
ipaddress==1.0.17
lxml==3.6.4
parsel==1.0.3
pyasn1==0.1.9
pyasn1-modules==0.0.8
pycparser==2.16
PyDispatcher==2.0.5
pyOpenSSL==16.2.0
queuelib==1.4.2
Scrapy==1.2.1
service-identity==16.0.0
six==1.10.0
Twisted==16.4.1
w3lib==1.15.0
zope.interface==4.3.2