- Hold Win and press Pause.
- Click Advanced System Settings.
- Click Environment Variables.
- Append
;C:\python27to thePathvariable. - Restart Command Prompt.
Adding Python to PATH on Windows - Stack Overflow
What if you forget to add Python to PATH?
How do I "set Python to PATH" without reinstalling Python?
what does it mean to " Add python<version> to PATH " ?
So the answer I've been getting is add python to environment variables which I have done
But I still get the error when running from user/downloads
python -c "from pdf2docx import Converter"
The system cannot execute the specified program.
p.s why are we banning images makes things so much more complicated?
- Hold Win and press Pause.
- Click Advanced System Settings.
- Click Environment Variables.
- Append
;C:\python27to thePathvariable. - Restart Command Prompt.
When setting Environmental Variables in Windows, I have gone wrong on many, many occasions. I thought I should share a few of my past mistakes here hoping that it might help someone. (These apply to all Environmental Variables, not just when setting Python Path)
Watch out for these possible mistakes:
- Kill and reopen your shell window: Once you make a change to the ENVIRONMENTAL Variables, you have to restart the window you are testing it on.
- NO SPACES when setting the Variables. Make sure that you are adding the
;C:\Python27WITHOUT any spaces. (It is common to tryC:\SomeOther; C:\Python27That space (โฃ) after the semicolon is not okay.) - USE A BACKWARD SLASH when spelling out your full path. You will see forward slashes when you try
echo $PATHbut only backward slashes have worked for me. - DO NOT ADD a final backslash. Only
C:\Python27NOTC:\Python27\
If you forget to add Python to the PATH, you won't be able to run Python in your command line from any other directory.
You will get a message saying,
'python' is not recognized as an internal or external command.
This is because Windows is trying to search for Python in its PATH variable and is unable to find it.
Here is a step-by-step instruction to add Python to the PATH variable in Windows 10.
-
Copy the directory to which Python is being installed.
-
Search for System Properties in the Search Bar.
-
Click on the "Environment Variables" button in System Properties.
-
Click on the "Path" variable and then click on "Edit".
-
Now here's the deal. Pay Attention! Paste the directory path from Step 1 at the top of the list. You can use the "Move up" button to get it to the top. Now click on "Ok".
Now you can open up your command line and run python. The Python interactive shell will open up.
*Here is a little extra tip! *
Add the Scripts folder to the PATH variable too. This is the folder where all your libraries will be installed.
If the instructions are not clear enough for you, you can also check out the visual guide containing images of every step, on my blog for achieving the above objective.
Good luck and let me know!
pretty much the title
asking bc i am installing python and i wanna know what will happen if i don't really click on the checkbox