当我尝试使用Scrapy时遇到一些问题。 我正在遵循Scrapy教程(here),但无法创建项目。
他们要我使用
scrapy startproject tutorial
创建一个项目并使用Scrapy (As this image shows)
我正在使用Spider IDE(可在Anaconda Navigator中找到),但其中的说明甚至代码都无效(我正在导入scrapy)。所以我去了Anaconda Prompt,并收到以下错误:
(base) C:\Users\wid>scrapy startproject tutorial
Traceback (most recent call last):
File "E:\Anaconda3\Scripts\scrapy-script.py", line 10, in <module>
sys.exit(execute())
File "E:\Anaconda3\lib\site-packages\scrapy\cmdline.py", line 149, in execute
cmd.crawler_process = CrawlerProcess(settings)
File "E:\Anaconda3\lib\site-packages\scrapy\crawler.py", line 252, in __init__
log_scrapy_info(self.settings)
File "E:\Anaconda3\lib\site-packages\scrapy\utils\log.py", line 149, in log_sc
rapy_info
for name, version in scrapy_components_versions()
File "E:\Anaconda3\lib\site-packages\scrapy\utils\versions.py", line 35, in sc
rapy_components_versions
("pyOpenSSL", _get_openssl_version()),
File "E:\Anaconda3\lib\site-packages\scrapy\utils\versions.py", line 43, in _g
et_openssl_version
import OpenSSL
File "E:\Anaconda3\lib\site-packages\OpenSSL\__init__.py", line 8, in <module>
from OpenSSL import crypto, SSL
File "E:\Anaconda3\lib\site-packages\OpenSSL\crypto.py", line 16, in <module>
from OpenSSL._util import (
File "E:\Anaconda3\lib\site-packages\OpenSSL\_util.py", line 6, in <module>
from cryptography.hazmat.bindings.openssl.binding import Binding
File "E:\Anaconda3\lib\site-packages\cryptography\hazmat\bindings\openssl\bind
ing.py", line 13, in <module>
from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: DLL load failed: O sistema operacional não pode executar %1.
(base) C:\Users\wid>
当我激活我的环境时,我仍然遇到相同的错误。
PS:这里还有另一个话题,但没有任何解决办法。