无法在Windows 7 64位系统上安装scrapy

时间:2014-02-06 17:34:49

标签: python scrapy

我有Windows 7 64位操作系统。我正在尝试安装Scrapy。我已经安装了所有先决条件但无法通过pip或easy_install安装它。我跟着这个: http://doc.scrapy.org/en/latest/intro/install.html

日志文件说:

C:\Python27\Scripts\pip run on 02/06/14 22:46:20
Requirement already satisfied (use --upgrade to upgrade): scrapy in c:\python27\lib\site-packages\scrapy-0.22.0-py2.7.egg
Requirement already satisfied (use --upgrade to upgrade): Twisted>=10.0.0 in c:\python27\lib\site-packages (from scrapy)
Requirement already satisfied (use --upgrade to upgrade): w3lib>=1.2 in c:\python27\lib\site-packages (from scrapy)
Requirement already satisfied (use --upgrade to upgrade): queuelib in c:\python27\lib\site-packages (from scrapy)
Requirement already satisfied (use --upgrade to upgrade): lxml in c:\python27\lib\site-packages (from scrapy)
Downloading/unpacking pyOpenSSL (from scrapy)
  Getting page https
.
.
.
.
creating build

creating build\lib.win-amd64-2.7

creating build\lib.win-amd64-2.7\OpenSSL

copying OpenSSL\__init__.py -> build\lib.win-amd64-2.7\OpenSSL

copying OpenSSL\tsafe.py -> build\lib.win-amd64-2.7\OpenSSL

copying OpenSSL\version.py -> build\lib.win-amd64-2.7\OpenSSL

creating build\lib.win-amd64-2.7\OpenSSL\test

copying OpenSSL\test\__init__.py -> build\lib.win-amd64-2.7\OpenSSL\test

copying OpenSSL\test\util.py -> build\lib.win-amd64-2.7\OpenSSL\test

copying OpenSSL\test\test_crypto.py -> build\lib.win-amd64-2.7\OpenSSL\test

copying OpenSSL\test\test_rand.py -> build\lib.win-amd64-2.7\OpenSSL\test

copying OpenSSL\test\test_ssl.py -> build\lib.win-amd64-2.7\OpenSSL\test

running build_ext

building 'OpenSSL.crypto' extension

Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "c:\users\manav\appdata\local\temp\pip_build_Manav\pyOpenSSL\setup.py", line 221, in <module>

    ...  and much more ;)"""
.
.
.
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 299, in query_vcvarsall

    raise ValueError(str(list(result.keys())))

ValueError: [u'path']

----------------------------------------
Cleaning up...
  Removing temporary dir c:\users\manav\appdata\local\temp\pip_build_Manav...
Command C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\manav\\appdata\\local\\temp\\pip_build_Manav\\pyOpenSSL\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\manav\appdata\local\temp\pip-806nz0-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\manav\appdata\local\temp\pip_build_Manav\pyOpenSSL
Exception information:
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\pip\basecommand.py", line 122, in main
    status = self.run(options, args)
  File "C:\Python27\lib\site-packages\pip\commands\install.py", line 279, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "C:\Python27\lib\site-packages\pip\req.py", line 1380, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "C:\Python27\lib\site-packages\pip\req.py", line 699, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "C:\Python27\lib\site-packages\pip\util.py", line 697, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\manav\\appdata\\local\\temp\\pip_build_Manav\\pyOpenSSL\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\manav\appdata\local\temp\pip-806nz0-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\manav\appdata\local\temp\pip_build_Manav\pyOpenSSL  File "C:\Python27\lib\distutils\msvc9compiler.py", line 299, in query_vcvarsall

    raise ValueError(str(list(result.keys())))

ValueError: [u'path']

----------------------------------------
Cleaning up...
  Removing temporary dir c:\users\manav\appdata\local\temp\pip_build_Manav...
Command C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\manav\\appdata\\local\\temp\\pip_build_Manav\\pyOpenSSL\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\manav\appdata\local\temp\pip-806nz0-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\manav\appdata\local\temp\pip_build_Manav\pyOpenSSL
Exception information:
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\pip\basecommand.py", line 122, in main
    status = self.run(options, args)
  File "C:\Python27\lib\site-packages\pip\commands\install.py", line 279, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "C:\Python27\lib\site-packages\pip\req.py", line 1380, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "C:\Python27\lib\site-packages\pip\req.py", line 699, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "C:\Python27\lib\site-packages\pip\util.py", line 697, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\manav\\appdata\\local\\temp\\pip_build_Manav\\pyOpenSSL\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\manav\appdata\local\temp\pip-806nz0-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\manav\appdata\local\temp\pip_build_Manav\pyOpenSSL

谢谢

1 个答案:

答案 0 :(得分:1)

嗯,使用Python&amp;窗户你会发现很多类似的问题。 (我知道因为我做了)

一种解决方案是在Windows二进制文件中下载OpenSSL 我相信它就在这里 http://slproweb.com/products/Win32OpenSSL.html

当然你也可以谷歌“包名+ Windows二进制文件”,如果这不削减它。

祝你好运。