我正在尝试使用“pip install scrapy”安装scrapy。我按照http://doc.scrapy.org/en/latest/intro/install.html#intro-install-platform-notes中提到的说明进行操作。它首先开始下载软件包并为每个软件包运行setup.py,但在尝试安装加密软件包时失败。有没有人知道如何解决这个问题。这是我的完整追溯:
C:\Users\Mubashar Kamran>pip install scrapy
Downloading/unpacking scrapy
Downloading Scrapy-0.24.4.tar.gz (783kB): 783kB downloaded
Running setup.py egg_info for package scrapy
no previously-included directories found matching 'docs\build'
Requirement already satisfied (use --upgrade to upgrade): Twisted>=10.0.0 in c:\
python27\lib\site-packages (from scrapy)
Downloading/unpacking w3lib>=1.8.0 (from scrapy)
Downloading w3lib-1.10.0.tar.gz
Running setup.py egg_info for package w3lib
Downloading/unpacking queuelib (from scrapy)
Downloading queuelib-1.2.2.tar.gz
Running setup.py egg_info for package queuelib
Requirement already satisfied (use --upgrade to upgrade): lxml in c:\python27\li
b\site-packages (from scrapy)
Downloading/unpacking pyOpenSSL (from scrapy)
Downloading pyOpenSSL-0.14.tar.gz (128kB): 128kB downloaded
Running setup.py egg_info for package pyOpenSSL
warning: no previously-included files matching '*.pyc' found anywhere in dis
tribution
no previously-included directories found matching 'doc\_build'
Downloading/unpacking cssselect>=0.9 (from scrapy)
Downloading cssselect-0.9.1.tar.gz
Running setup.py egg_info for package cssselect
no previously-included directories found matching 'docs\_build'
Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in c:\pytho
n27\lib\site-packages (from scrapy)
Requirement already satisfied (use --upgrade to upgrade): zope.interface>=3.6.0
in c:\python27\lib\site-packages (from Twisted>=10.0.0->scrapy)
Downloading/unpacking cryptography>=0.2.1 (from pyOpenSSL->scrapy)
Downloading cryptography-0.5.4.tar.gz (320kB): 320kB downloaded
Running setup.py egg_info for package cryptography
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "c:\users\mubash~1\appdata\local\temp\pip_build_Mubashar Kamran\crypt
ography\setup.py", line 174, in <module>
"test": PyTest,
File "C:\Python27\lib\distutils\core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "build\bdist.win32\egg\setuptools\dist.py", line 239, in __init__
File "build\bdist.win32\egg\setuptools\dist.py", line 263, in fetch_build_
eggs
File "build\bdist.win32\egg\pkg_resources.py", line 568, in resolve
if entry is None:
File "build\bdist.win32\egg\pkg_resources.py", line 806, in best_match
is returned.
File "build\bdist.win32\egg\pkg_resources.py", line 818, in obtain
File "build\bdist.win32\egg\setuptools\dist.py", line 313, in fetch_build_
egg
File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 609,
in easy_install
File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 639,
in install_item
File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 825,
in install_eggs
File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 1031
, in build_and_install
File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 1019
, in run_setup
distutils.errors.DistutilsError: Setup script exited with error: Unable to f
ind vcvarsall.bat
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "c:\users\mubash~1\appdata\local\temp\pip_build_Mubashar Kamran\cryptogra
phy\setup.py", line 174, in <module>
"test": PyTest,
File "C:\Python27\lib\distutils\core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "build\bdist.win32\egg\setuptools\dist.py", line 239, in __init__
File "build\bdist.win32\egg\setuptools\dist.py", line 263, in fetch_build_eggs
File "build\bdist.win32\egg\pkg_resources.py", line 568, in resolve
if entry is None:
File "build\bdist.win32\egg\pkg_resources.py", line 806, in best_match
is returned.
File "build\bdist.win32\egg\pkg_resources.py", line 818, in obtain
File "build\bdist.win32\egg\setuptools\dist.py", line 313, in fetch_build_egg
File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 609, in
easy_install
File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 639, in
install_item
File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 825, in
install_eggs
File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 1031, in
build_and_install
File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 1019, in
run_setup
distutils.errors.DistutilsError: Setup script exited with error: Unable to find
vcvarsall.bat
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in c:\users\mubash~1\a
ppdata\local\temp\pip_build_Mubashar Kamran\cryptography
Storing complete log in C:\Users\Mubashar Kamran\pip\pip.log
C:\Users\Mubashar Kamran>