我正在尝试安装scrapy并且到目前为止已经安装了依赖Twisted Matrix,OpenSSL,也许还有一两个其他人。我使用简易安装和输入命令
easy_install Scrapy
我收到此错误。
C:\Users\Joel>easy_install Scrapy
Searching for Scrapy
Best match: scrapy 0.24.2
Processing scrapy-0.24.2-py2.7.egg
scrapy 0.24.2 is already the active version in easy-install.pth
Installing scrapy script to C:\Users\Joel\Anaconda\Scripts
Installing scrapy.bat script to C:\Users\Joel\Anaconda\Scripts
Using c:\users\joel\anaconda\lib\site-packages\scrapy-0.24.2-py2.7.egg
Processing dependencies for Scrapy
Searching for cryptography>=0.2.1
Reading https://pypi.python.org/simple/cryptography/
Best match: cryptography 0.5.3
Downloading https://pypi.python.org/packages/source/c/cryptography/cryptography-
0.5.3.tar.gz#md5=51a6a303bf35bf2bd18de6a51277020b
Processing cryptography-0.5.3.tar.gz
Writing c:\users\joel\appdata\local\temp\easy_install-cxadua\cryptography-0.5.3\
setup.cfg
Running cryptography-0.5.3\setup.py -q bdist_egg --dist-dir c:\users\joel\appdat
a\local\temp\easy_install-cxadua\cryptography-0.5.3\egg-dist-tmp-mbuamd
Searching for cffi>=0.8
Reading https://pypi.python.org/simple/cffi/
Best match: cffi 0.8.6
Downloading https://pypi.python.org/packages/source/c/cffi/cffi-0.8.6.tar.gz#md5
=474b5a68299a6f05009171de1dc91be6
Processing cffi-0.8.6.tar.gz
Writing c:\users\joel\appdata\local\temp\easy_install-cxadua\cryptography-0.5.3\
temp\easy_install-autsix\cffi-0.8.6\setup.cfg
Running cffi-0.8.6\setup.py -q bdist_egg --dist-dir c:\users\joel\appdata\local\
temp\easy_install-cxadua\cryptography-0.5.3\temp\easy_install-autsix\cffi-0.8.6\
egg-dist-tmp-2x2ty5
c/_cffi_backend.c: In function 'convert_array_from_object':
c/_cffi_backend.c:1130:26: warning: unknown conversion type character 'z' in for
mat [-Wformat]
c/_cffi_backend.c:1130:26: warning: too many arguments for format [-Wformat-extr
a-args]
c/_cffi_backend.c:1155:30: warning: unknown conversion type character 'z' in for
mat [-Wformat]
c/_cffi_backend.c:1155:30: warning: too many arguments for format [-Wformat-extr
a-args]
c/_cffi_backend.c:1175:30: warning: unknown conversion type character 'z' in for
mat [-Wformat]
c/_cffi_backend.c:1175:30: warning: too many arguments for format [-Wformat-extr
a-args]
c/_cffi_backend.c: In function 'convert_struct_from_object':
c/_cffi_backend.c:1208:26: warning: unknown conversion type character 'z' in for
mat [-Wformat]
c/_cffi_backend.c:1208:26: warning: too many arguments for format [-Wformat-extr
a-args]
c/_cffi_backend.c:1221:30: warning: unknown conversion type character 'z' in for
mat [-Wformat]
c/_cffi_backend.c:1221:30: warning: too many arguments for format [-Wformat-extr
a-args]
c/_cffi_backend.c: In function 'cdata_repr':
c/_cffi_backend.c:1608:13: warning: unknown conversion type character 'L' in for
mat [-Wformat]
c/_cffi_backend.c:1608:13: warning: too many arguments for format [-Wformat-extr
a-args]
c/_cffi_backend.c:1620:9: warning: unknown conversion type character 'z' in form
at [-Wformat]
c/_cffi_backend.c:1620:9: warning: too many arguments for format [-Wformat-extra
-args]
c/_cffi_backend.c: In function 'cdataowning_repr':
c/_cffi_backend.c:1672:30: warning: unknown conversion type character 'z' in for
mat [-Wformat]
c/_cffi_backend.c:1672:30: warning: too many arguments for format [-Wformat-extr
a-args]
c/_cffi_backend.c: In function '_cdata_get_indexed_ptr':
c/_cffi_backend.c:1845:26: warning: unknown conversion type character 'z' in for
mat [-Wformat]
c/_cffi_backend.c:1845:26: warning: unknown conversion type character 'z' in for
mat [-Wformat]
c/_cffi_backend.c:1845:26: warning: too many arguments for format [-Wformat-extr
a-args]
c/_cffi_backend.c: In function '_cdata_getslicearg':
c/_cffi_backend.c:1897:26: warning: unknown conversion type character 'z' in for
mat [-Wformat]
c/_cffi_backend.c:1897:26: warning: unknown conversion type character 'z' in for
mat [-Wformat]
c/_cffi_backend.c:1897:26: warning: too many arguments for format [-Wformat-extr
a-args]
c/_cffi_backend.c: In function 'cdata_ass_slice':
c/_cffi_backend.c:1976:26: warning: unknown conversion type character 'z' in for
mat [-Wformat]
c/_cffi_backend.c:1976:26: warning: unknown conversion type character 'z' in for
mat [-Wformat]
c/_cffi_backend.c:1976:26: warning: too many arguments for format [-Wformat-extr
a-args]
c/_cffi_backend.c:1994:30: warning: unknown conversion type character 'z' in for
mat [-Wformat]
c/_cffi_backend.c:1994:30: warning: unknown conversion type character 'z' in for
mat [-Wformat]
c/_cffi_backend.c:1994:30: warning: too many arguments for format [-Wformat-extr
a-args]
c/_cffi_backend.c:2008:22: warning: unknown conversion type character 'z' in for
mat [-Wformat]
c/_cffi_backend.c:2008:22: warning: too many arguments for format [-Wformat-extr
a-args]
c/_cffi_backend.c: In function 'cdata_call':
c/_cffi_backend.c:2392:30: warning: unknown conversion type character 'z' in for
mat [-Wformat]
c/_cffi_backend.c:2392:30: warning: format '%s' expects argument of type 'char *
', but argument 3 has type 'Py_ssize_t' [-Wformat]
c/_cffi_backend.c:2392:30: warning: too many arguments for format [-Wformat-extr
a-args]
c/_cffi_backend.c: In function 'cast_to_integer_or_char':
c/_cffi_backend.c:2941:26: warning: unknown conversion type character 'z' in for
mat [-Wformat]
c/_cffi_backend.c:2941:26: warning: format '%s' expects argument of type 'char *
', but argument 3 has type 'Py_ssize_t' [-Wformat]
c/_cffi_backend.c:2941:26: warning: too many arguments for format [-Wformat-extr
a-args]
c/_cffi_backend.c:2953:26: warning: unknown conversion type character 'z' in for
mat [-Wformat]
c/_cffi_backend.c:2953:26: warning: format '%s' expects argument of type 'char *
', but argument 3 has type 'Py_ssize_t' [-Wformat]
c/_cffi_backend.c:2953:26: warning: too many arguments for format [-Wformat-extr
a-args]
c/_cffi_backend.c: In function 'new_array_type':
c/_cffi_backend.c:3505:9: warning: unknown conversion type character 'l' in form
at [-Wformat]
c/_cffi_backend.c:3505:9: warning: too many arguments for format [-Wformat-extra
-args]
c/_cffi_backend.c: In function 'b_complete_struct_or_union':
c/_cffi_backend.c:3934:22: warning: unknown conversion type character 'z' in for
mat [-Wformat]
c/_cffi_backend.c:3934:22: warning: unknown conversion type character 'z' in for
mat [-Wformat]
c/_cffi_backend.c:3934:22: warning: too many arguments for format [-Wformat-extr
a-args]
In file included from c/libffi_msvc/ffi.h:63:0,
from c/libffi_msvc\ffi.c:29:
c/libffi_msvc/ffitarget.h:42:32: error: expected '=', ',', ';', 'asm' or '__attr
ibute__' before 'ffi_arg'
In file included from c/libffi_msvc\ffi.c:29:0:
c/libffi_msvc/ffi.h:185:3: error: unknown type name 'ffi_arg'
c/libffi_msvc\ffi.c: In function 'ffi_closure_SYSV':
c/libffi_msvc\ffi.c:257:18: warning: variable 'rtype' set but not used [-Wunused
-but-set-variable]
c/libffi_msvc\ffi.c: In function 'ffi_prep_closure_loc':
c/libffi_msvc\ffi.c:409:9: warning: variable 'bytes' set but not used [-Wunused-
but-set-variable]
error: Setup script exited with error: command 'C:\\Users\\Joel\\Anaconda\\Scrip
ts\\gcc.bat' failed with exit status 1
另外,我尝试重新安装依赖项,当我尝试使用
安装pyOpenSSL时easy_install pyOpenSSL
它给了我同样的错误。
任何人都可以帮忙解决这个问题吗?
答案 0 :(得分:1)
这些是我用于在多台Windows机器上安装scrapy的步骤。也许他们会帮忙。
安装python 2.7.x
下载并安装pip:
下载get-pip.py(http://pip.readthedocs.org/en/latest/installing.html)
运行:python get-pip.py
安装Scrapy
下载并安装2008 Visual C ++ Redistributable(编译器)
下载pywin32可执行文件并安装