创建项目时Scrapy中的openSSL错误

时间:2016-04-09 23:58:49

标签: python openssl scrapy web-crawler

我刚刚在scrapy教程网站上安装了scrapy及其所有东西。 当我使用Scrapy创建项目时使用这样的命令

  

scrapy startproject [projectname]

所以它给了我以下错误

Traceback (most recent call last):

File "c:\python\python27\lib\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)

File "c:\python\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals

File "C:\Python\Python27\Scripts\scrapy.exe\__main__.py", line 9, in <module>

File "c:\python\python27\lib\site-packages\scrapy\cmdline.py", line 122, in execute
 cmds = _get_commands_dict(settings, inproject)

File "c:\python\python27\lib\site-packages\scrapy\cmdline.py", line 46, in _get_commands_dict
    cmds = _get_commands_from_module('scrapy.commands', inproject)

File "c:\python\python27\lib\site-packages\scrapy\cmdline.py", line 29, in _get_commands_from_module
    for cmd in _iter_command_classes(module):

File "c:\python\python27\lib\site-packages\scrapy\cmdline.py", line 20, in _iter_command_classes
    for module in walk_modules(module_name):

File "c:\python\python27\lib\site-packages\scrapy\utils\misc.py", line 71, in walk_modules
    submod = import_module(fullpath)

File "c:\python\python27\lib\importlib\__init__.py", line 37, in import_module
    __import__(name)

File "c:\python\python27\lib\site-packages\scrapy\commands\version.py", line 6, in <module>    
    import OpenSSL

ImportError: No module named OpenSSL

之后,即使我尝试使用pip手动安装openSSl 但它说已经安装了包

帮助我。

1 个答案:

答案 0 :(得分:0)

您可以通过执行以下操作来满足缺少的依赖关系:

  1. 您需要在系统上安装OpenSSL二进制文件。获取二进制文件 从这里:https://wiki.openssl.org/index.php/Binaries

  2. 然后你需要从这里安装pyOpenSSL:https://pypi.python.org/pypi/pyOpenSSL/0.13