In addition to having Scrapy installed via pip
you must have the Scripts
directory of your Python installation in the PATH, where by default the executable should be found:
First check the path where you have Python installed , if you have several versions of the interpreter you should look for the one where you have Scrapy installed, for example for the default installation directory in Python W10 3.6 as seen in the previous image it would be:
C: \ Users \ YourUser \ AppData \ Local \ Programs \ Python \ Python36
Then add the path to /Scripts
to Path, for the previous example it would be:
C: \ Users \ YourUser \ AppData \ Local \ Programs \ Python \ Python36 \ Scripts \
Once the path has been added to the Path, do not forget to restart the terminal or open a new instance of CMD for the change to take effect.
The other option is that you position yourself with the terminal in the /Scripts
directory and once it is placed in it, you cast it as you do now, or call the executable by passing its absolute path:
$ C: \ Users \ YourUser \ AppData \ Local \ Programs \ Python \ Python36 \ Scripts \ scrapy runspider ...
In this case it does not matter, but multiple commands of scraper
(like crawl
) require having a correctly configured project.