我试图通过“pip install scrapy”安装scrapy,结果得到:c:\python36\python.exe -u -c "import setuptools,
tokenize;__file__='C:\\Users\\tzvia\\AppData\\Local\\Temp\\pip-install-
07h63108\\Twisted\\setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --record
C:\Users\tzvia\AppData\Local\Temp\pip-record-hy8qkma1\install-record.txt
--single-version-externally-managed --compile" failed with error code 1
in C:\Users\tzvia\AppData\Local\Temp\pip-install-07h63108\Twisted\
我尝试了“conda install-c conda forge scrapy”,它似乎已经安装了scray:
^{pr2}$
所以我试着用了一个小错误:C:\Users\tzvia>scrapy
Traceback (most recent call last):
File "C:\Users\tzvia\Anaconda3\Scripts\scrapy-script.py", line 6, in
from scrapy.cmdline import execute
File "C:\Users\tzvia\Anaconda3\lib\site-packages\scrapy\__init__.py", line
34, in
from scrapy.spiders import Spider
File "C:\Users\tzvia\Anaconda3\lib\site-packages\scrapy\spiders\__init__.py", line 10, in
from scrapy.http import Request
File "C:\Users\tzvia\Anaconda3\lib\site-packages\scrapy\http\__init__.py", line 11, in
from scrapy.http.request.form import FormRequest
File "C:\Users\tzvia\Anaconda3\lib\site-
packages\scrapy\http\request\form.py", line 11, in
import lxml.html
File "C:\Users\tzvia\Anaconda3\lib\site-packages\lxml\html\__init__.py",
line 54, in
from .. import etree
ImportError: DLL load failed: The specified module could not be found.
我试图安装lxml,结果又是“失败,错误代码1”。在
有人能帮我吗?
我使用python3.6.1和windows10