How can I use Scrapy in Anaconda

Asked

Viewed 485 times

0

Hi, I’m having trouble creating a project with Scrapy. I’m studying data science in college and I have to use Scrapy. I’m using Anaconda. First through the Spider IDE (Anaconda Navigator), now I’m trying for the same prompt. The problem is to use even, because I’m not able to follow the tutorial of Scrapy: Foto do tutorial

According to the tutorial I must use the commandscrapy startproject tutorialbut when using I have the following error:

  (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>

inserir a descrição da imagem aqui

I already repeated the code with my Environment enabled and the error is the same...

I haven’t found any solution to this problem, and I’m just looking for a way to use Scrapy!! PS: The installation of Scrapy did not give any problem, only at the time of using even.

  • I am using scrapy here without problems, but I do not use anaconda; I installed by Pip same...

  • I had several problems but managed to install by Pip, thanks!

1 answer

0


So first, you must run the Anaconda Prompt as administrator, set by the command cd the directory you want to save the project and then create the project by the command scrapy startproject your design , I don’t know if that’s right, also remembering that you need to have the scrapy, you can install it through the Anaconda Library IDE

  • Thanks for the help, I got it. I was doing this but when Scrappy was installed by Anaconda it didn’t run, so I had to install through Pip

Browser other questions tagged

You are not signed in. Login or sign up in order to post.