2012-11-04 3 views
2

쉬운 설치로 Scrapy를 설치하려고합니다. Cython을 설치했는데 제대로 작동하는 것 같습니다. libxml2 양식을 설치했습니다. cygwinccompiler이 게시물 다음에 변경되었습니다. scrapy installation error 나는 여전히 오류가있어서 다음에 무엇을해야할지 모릅니다. 그것이 내가 윈도우 7 32 비트 및 파이썬 2.7Windows7에서 치료를 설치

C:\Users\t>easy_install -U Scrapy 
Searching for Scrapy 
Reading http://pypi.python.org/simple/Scrapy/ 
Reading http://scrapy.org 
Best match: scrapy 0.16.1 
Processing scrapy-0.16.1-py2.7.egg 
scrapy 0.16.1 is already the active version in easy-install.pth 
Installing scrapy script to C:\Python27\Scripts 
Installing scrapy.bat script to C:\Python27\Scripts 

Using c:\python27\lib\site-packages\scrapy-0.16.1-py2.7.egg 
Processing dependencies for Scrapy 
Searching for lxml 
Reading http://pypi.python.org/simple/lxml/ 
Reading http://codespeak.net/lxml 
Best match: lxml 3.0.1 
Downloading http://lxml.de/files/lxml-3.0.1.tgz 
Processing lxml-3.0.1.tgz 
Running lxml-3.0.1\setup.py -q bdist_egg --dist-dir c:\users\t\appdata\lo 
cal\temp\easy_install-7mgdch\lxml-3.0.1\egg-dist-tmp-686xm8 
Building lxml version 3.0.1. 
Building without Cython. 
ERROR: 'xslt-config' is not recognized as an internal or external command, 
operable program or batch file. 

** make sure the development packages of libxml2 and libxslt are installed ** 

Using build configuration of libxslt 
warning: no files found matching '*.txt' under directory 'src\lxml\tests' 
In file included from src\lxml\lxml.etree.c:254:0: 
c:\users\t\appdata\local\temp\easy_install-7mgdch\lxml-3.0.1\src\lxml\inc 
ludes/etree_defs.h:9:31: fatal error: libxml/xmlversion.h: No such file or direc 
tory 
compilation terminated. 
error: Setup script exited with error: command 'gcc' failed with exit status 1 
+0

분명히 libxml2 및 libxslt의 개발 패키지를 설치해야합니다. – pydsigner

+0

이미 설치 했음 – tomasz74

+0

http://doc.scrapy.org/en/latest/intro/install.html을 읽으셨습니까? – pydsigner

답변

4

당신이 이미 그것을 해결 한 경우 확실하지가 Building without Cython 것을 왜 거기에 또한 모르겠어요. 오늘은이 문제에 달려 여기에 내가 그것을 해결하는 방법을 직접 lxml이 바이너리 잡아입니다 : http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml

및 Scrapy 어떻게 든 당신이 그것을 설치하고 다시 구축하려고 있다는 사실을 무시 설치 PIP, 그래서 실패합니다. 그러나, pip 설치를 실행하는 디렉토리에는 'build'디렉토리가 있으며, 거기에는 'Scrapy \ setup.py'가 있습니다.

이제 파일의 맨 아래에 찾을 : LXML 및 pyopenssl을 ... = [ 'install_requires']

setup_args을 제거 (당신은 대부분 직접 당신이 경우 바이너리를 설치해야합니다 Windows에서 작업 중입니다. 여기에서 찾을 수 있습니다 : http://slproweb.com/products/Win32OpenSSL.html)

동일한 디렉토리에서 다시 Scrapy를 실행하면 좋은 결과를 얻을 수 있습니다.

+0

고마워요 – tomasz74

+0

토마스에게 효과가 있었습니까? 그렇다면 답을 승인 해주십시오. – airfang

+0

이것이 효과가 있었음에 틀림 없지만 왜 그것이 나를 위해서하지 않았는 지 잘 모르겠습니다. pip가 lxml을 다시 설치하려고 시도했습니다. 그것은 내 virtualenv 설정 될 수 있습니다. 어쨌든 필자는''pip install --no-deps Scrapy''를 대안으로 사용했습니다. – lastoneisbearfood

0

나는 (Windows 10, Python 2.7.12) 같은 문제가 있었고 여기 저에게 도움이되었습니다. "easy_install"대신 "pip install scrapy"를 사용했습니다. 2.7 용 pip가 설치되어 있지 않은 경우 여기 official documentation입니다. 그래도 문제가 해결되지 않으면 다음을 시도해보십시오. manual installation directions

관련 문제