scrapy在python3版本运行问题
File "f:\python\lib\site-packages\scrapy-1.1.3-py3.5.egg\scrapy\utils\decorators.py", line 4, in <module>
from twisted.internet import defer, threads
File "f:\python\lib\site-packages\twisted-15.4.0-py3.5.egg\twisted\internet\defer.py", line 29, in <module>
from twisted.python import lockfile, failure
File "f:\python\lib\site-packages\twisted-15.4.0-py3.5.egg\twisted\python\lockfile.py", line 52, in <module>
_open = file
NameError: name 'file' is not defined
我百度该问题,然后按度娘所说, 将 _open = file 改为:try:
_open = file
except:
_open = open
然而我改了之后,还是报这个错,是我没改对嘛?求大神指点
环境 win10 64位 python3.5
下面是我安装scrapy所下载的python包
C:\Users\tp>pip freeze
attrs==16.3.0
cffi==1.9.1
cryptography==1.7.1
cssselect==1.0.0
django==1.10.1
idna==2.1
lxml==3.7.0
parsel==1.1.0
pyasn1==0.1.9
pyasn1-modules==0.0.8
pycparser==2.17
pydispatcher==2.0.5
pymysql==0.7.9
pyopenssl==16.2.0
pytest-runner==2.9
pywin32==219
queuelib==1.4.2
scrapy==1.1.3
service-identity==16.0.0
setuptools-scm==1.15.0
six==1.10.0
twisted==15.4.0
w3lib==1.16.0
zope.interface==4.1.1