Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scrapy installed, but won't recognized in the command line

I installed Scrapy in my python 2.7 environment in windows 7 but when I trying to start a new Scrapy project using scrapy startproject newProject the command prompt show this massage

'scrapy' is not recognized as an internal or external command,
operable program or batch file.

Note:

  • I also have python 3.5 but that do not have scrapy
  • This question is not duplicate of this
like image 565
kathi Avatar asked Sep 14 '16 09:09

kathi


People also ask

What is the Scrapy command-line tool?

Scrapy is controlled through the scrapy command-line tool, to be referred here as the “Scrapy tool” to differentiate it from the sub-commands, which we just call “commands” or “Scrapy commands”. The Scrapy tool provides several commands, for multiple purposes, and each one accepts a different set of arguments and options.

How do I use Scrapy with no arguments?

You can start by running the Scrapy tool with no arguments and it will print some usage help and the available commands: Scrapy X.Y - no active project Usage: scrapy <command> [options] [args] Available commands: crawl Run a spider fetch Fetch a URL using the Scrapy downloader [...]

How do I get the version of Scrapy in Python?

Get the value of a Scrapy setting. If used inside a project it’ll show the project setting value, otherwise it’ll show the default Scrapy value for that setting. Run a spider self-contained in a Python file, without having to create a project. $ scrapy runspider myspider.py [ ... spider starts crawling ... ] Prints the Scrapy version.

How do I add custom Scrapy commands?

A module to use for looking up custom Scrapy commands. This is used to add custom commands for your Scrapy project. You can also add Scrapy commands from an external library by adding a scrapy.commands section in the entry points of the library setup.py file.


1 Answers

Scrapy should be in your environment variables. You can check if it's there with the following in windows:

echo %PATH% # To print only the path
set # For all 

or

printenv # In linux

Make should scrapy is in your path and if it's not, add it to your path and it should (probably) resolve your problem. I said probably, since it might be caused by other issues you have not mentioned.

like image 115
SpiXel Avatar answered Sep 19 '22 15:09

SpiXel