Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I need to set environment variables for Python to make Scrapy work?

I have just got Scrapy set up on my machine (Windows Vista 64 bit, Python.org version 2.7, 64 bit shell). I have tried running the command 'scrapy startproject myproject' and got the seemingly standard error message of 'scrapy is not a recognised command.

A lot of the other people who have asked this question have been advised that they need to set up environment variables for Python in Windows. I'm not entirely sure why I am supposed to do this to be honest. Could someone please explain?

like image 238
gdogg371 Avatar asked Oct 01 '22 10:10

gdogg371


1 Answers

Windows uses the environment variable called PATH to identify a command in comand prompt and directs to the folder in which the command is associated with. For instance, when you install Python, it appends it's location in your system to the PATH variable, so that when you call it in cmd (type in python), it knows where to look and calls the appropriate program/s at that location.

like image 167
idiot.py Avatar answered Oct 05 '22 01:10

idiot.py