2014-02-06 161 views
0

我有Windows 7 64位操作系統。我正在嘗試安裝Scrapy。我已經安裝了所有先決條件,但無法通過pip或easy_install進行安裝。我也跟着這樣的: http://doc.scrapy.org/en/latest/intro/install.html無法在Windows 7 64位系統上安裝scrapy

日誌文件中說:

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

好,與Python &窗戶,你會發現很多類似的問題。 (我知道,因爲我做了)

一種解決方案是下載的OpenSSL在Windows二進制 我相信這是設在這裏 http://slproweb.com/products/Win32OpenSSL.html

當然,你也可以google‘包名+二進制的窗口’如果沒有按作者「切割它。

祝你好運。

+0

還有同樣的問題回答:http://stackoverflow.com/questions/22073516/failed-to-install-python-cryptography-package-with-pip-and-setup-py 它實際上試圖編譯smth,所以有msvc編譯器看起來很重要 –

相關問題