install scrapy on win 7 (64
I'm trying to install scrapy for python2.6, but it seems not going well. Here is the packages installed:
G:Python26Scripts>pip freeze
Scrapy==0.16.4
Twisted==12.3.0
libxml2-python==2.7.7
lxml==2.3.6
pyopenssl==0.13
w3lib==1.2
zope.interface==3.8.0
I also got iconv and zlib. And this is the log when installing scrapy with pip. I don't know what I should do next, am I missing sth? Need instructions, thank you.
win 7 64-bit, Visual C++ installed
C:Usersd>pip install scrapy
Downloading/unpacking scrapy
Downloading Scrapy-0.16.4.tar.gz (679kB): 679kB downloaded
Running setup.py egg_info for package scrapy
warning: no files found matching 'license.txt' under directory 'scrapy'
no previously-included directories found matching 'docsbuild'
Requirement already satisfied (use --upgrade to upgrade): Twisted>=8.0 in g:pyt
hon26libsite-packages (from scrapy)
Requirement already satisfied (use --upgrade to upgrade): w3lib>=1.2 in g:pytho
n26libsite-packages (from scrapy)
Requirement already satisfied (use --upgrade to upgrade): lxml in g:python26li
bsite-packageslxml-2.3.6-py2.6-win32.egg (from scrapy)
Requirement already satisfied (use --upgrade to upgrade): pyOpenSSL in g:python
26libsite-packagespyopenssl-0.13-py2.6-win32.egg (from scrapy)
Requirement already satisfied (use --upgrade to upgrade): zope.interface>=3.6.0
in g:python26libsite-packageszope.interface-3.8.0-py2.6-win32.egg (from Twis
ted>=8.0->scrapy)
Requirement already satisfied (use --upgrade to upgrade): setuptools in g:pytho
n26libsite-packages (from zope.interface>=3.6.0->Twisted>=8.0->scrapy)
Installing collected packages: scrapy
Running setup.py install for scrapy
warning: no files found matching 'license.txt' under directory 'scrapy'
no previously-included directories found matching 'docsbuild'
Successfully installed scrapy
Cleaning up...
C:Usersd>scrapy
Traceback (most recent call last):
File "G:Python26librunpy.py", line 122, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "G:Python26librunpy.py", line 34, in _run_code
exec code in run_globals
File "G:Python26libsite-packagesscrapycmdline.py", line 7, in <module>
from scrapy.crawler import CrawlerProcess
File "G:Python26libsite-packagesscrapycrawler.py", line 5, in <module>
from scrapy.core.engine import ExecutionEngine
File "G:Python26libsite-packagesscrapycoreengine.py", line 14, in <modul
e>
from scrapy.core.downloader import Downloader
File "G:Python26libsite-packagesscrapycoredownloader__init__.py", line
16, in <module>
from .middleware import DownloaderMiddlewareManager
File "G:Python26libsite-packagesscrapycoredownloadermiddleware.py", lin
e 7, in <module>
from scrapy.http import Request, Response
File "G:Python26libsite-packagesscrapyhttp__init__.py", line 11, in <mod
ule>
from scrapy.http.request.form import FormRequest
File "G:Python26libsite-packagesscrapyhttprequestform.py", line 9, in <
module>
import lxml.html
File "G:Python26libsite-packageslxml-2.3.6-py2.6-win32.egglxmlhtml__ini
t__.py", line 12, in <module>
from lxml import etree
ImportError: DLL load failed: %1 is not a valid Win32 application
You need to follow the instructions here (also listed above).
The specific DLL error listed in the question is due (at least in my case) to installing the 32 bit OpenSSL with 64 bit everything else. After I installed the correct OpenSSL (and, incidentally, had to uninstall all of the packages in the link above and start over- order matters for the dependency msi installers), scrapy is working fine on python27, windows7, 64 bit.
请阅读本指南以在Windows 7上安装scrapy。egenix-pyopenssl被列为必需软件包,并且安装pywin32也可能有所帮助。
In my case I did upgrade python which caused this problem.
a simple scrapy upgrade did the trick
pip install --upgrade Scrapy
Also install correct version of pywin : http://doc.scrapy.org/en/latest/intro/install.html#windows
链接地址: http://www.djcxy.com/p/69162.html下一篇: 在win 7上安装scrapy(64