How To Add Python To Windows 10 PATH
last updated: Feb 21,2021
In this post, I will show you show how to add Python to Windows path. To check if Python is already added to Windows path.
1. Press "Window + s" key together and then type "cmd" and finally press "enter" afterwards.
2. In the "cmd" window, type python. If Python is not installed, you would see following error message..
Above error means, Python is not added to Windows path. Assuming you have Python already installed, let us add the Python to Windows path.
Find where Python is installed in Windows 10
To do that...
1. Press Window + s on your keyboard
2. Type python.exe in the search window
3. Right click on the python app and choose "open file location". You would see that will open up the directory that contains the Python app exe file. Right click on the Python app and then choose "properties". Properties dialog box would show you the path to your Python app, copy the path show in "Start in:" box as shown highlighted blue in the snapshot below.
Add Python Path To Windows Environment Variables
1. Press "Window + s" again on keyboard. In the search box, type "system environment" and press "enter". System properties dialog box would show up and click on "environment variables".
2. In the environment variables window, under the "System variables" section, click on path and hit "edit" option after that. "Edit environment variable" would show up as shown below. Click on the "New" button to add new path.
3. Right click on the row where your cursor is flicking and choose "paste" to add the path that you copied in step 3 and press "ok" after that. Now let us go back to the cmd window. Remember to apply the new changes, you need to open a new cmd window.
4. Press "Window + s" keys on the keyboard and type cmd and then press enter to bring up the cmd window. Now type "python" and press enter. You should see Python shell as shown below...
That's it. You can use you Python now from the Window CMD prompt.
Install Pip on Windows
If you have Python3, it means Pip is already available to you. To access it from Windows "cmd" prompt, we need to make sure it's path is added in to the Windows environment.
Just like we added above, we need to add Pip path too. Here is what you need to do...
1. Go to your Python3 installation directory. You should see in the same directory a "Scripts" folder as shown in the snapshot below. For me the path is "C:\Users\aphull\AppData\Local\Programs\Python\Python39\Scripts"
2. Now add your "Scripts" folder path to the System environment Variables.
3. Open new "cmd" prompt window and type "pip --version". You should see version of pip installed on your machine.
- How To Add Regression Line On Ggplot
- How To Read JSON Data Using Python Pandas
- How To Install Python With Conda
- How To Analyze Wikipedia Data Tables Using Python Pandas
- How To Convert Python List To Pandas DataFrame
- How to Plot a Histogram in Python
- How to Generate Random Numbers in Python
- How to Upgrade Python PIP
- How To Use Python Pip
- How to Export Pandas DataFrame to a CSV File