I\'ve been trying to add the Python path to the command line on Windows 7, yet no matter the method I try, nothing seems to work. I\'ve used the set
command, I\
For anyone trying to achieve this with Python 3.3+, the Windows installer now includes an option to add python.exe to the system search path. Read more in the docs.
If you have got frustrated by setting the path for the python just download the new version of python uninstall the older version of the python and while installing the new version it will ask whether to set path mark that and install
its the best way
write that on your Command Prompt:
set Path=%path%
Replace %path% by the Path of your Python Folder Example:
set Path=C:/Python27
Open cmd.exe with administrator privileges (right click on app). Then type:
setx path "%path%;C:\Python27;"
Remember to end with a semi-colon and don't include a trailing slash.
You can set the path from the current cmd window using the PATH =
command. That will only add it for the current cmd instance. if you want to add it permanently, you should add it to system variables. (Computer > Advanced System Settings > Environment Variables)
You would goto your cmd instance, and put in PATH=C:/Python27/;%PATH%
.
You need to make changes in your system variable
-- Right click on "My computer"
-- Click "Properties"
-- Click "Advanced system settings" in the side panel
-- Click on Environment Variable -- You will two sections of user variable and system variable
-- Under system variable section search for the variable 'Path' click on edit and add
"C:\Python27;"
(without quotes) save it
-- Now open command line type 'path' hit enter you will see path variable has been modified
-- Now type python --version
you will see the python version
And it is done