Python is a powerful programming language that is scalable and uses code that is readable and clear for all types of projects. Python is also available across a number of operating systems, making it a popular choice for developers. If you are using Python on your Windows operating system, you may need to adjust your System Environment Variables to simplify utilizing Python on your server.
The latest Python installer for Windows can set the System Environment Variable Path automatically if selected during the installation process.
This method involves modifying the path of an existing Python installation. To verify if the path setting is correct or current, follow these steps.
Open an administrative command prompt by going to
Start > Windows System > Command Prompt.
Next, right-click on the command prompt icon, choose More, then choose “run as administrator“.
Once the Type in the python command, and then press Enter. If the System Variable Path is correctly set, you should receive output similar to what is shown below.
When using Powershell, the output will look like this.
If an error is seen indicating that the Python command is unknown, but we have confirmed that Python is installed and can be launched from within its directory, we will need to add the Python path to the System Environment Variables.
To begin, type in Win+R to open a run dialog box, Then type in sysdm.cpl and hit enter. This will open the System Properties dialog box.
Click on the Advanced tab at the top and then on the Environment Variables button at the bottom.
This will open both the User and System Variables dialog box.
Now, we will create a new User Variable. Click on the New button.
A new window will open. Now we will enter the following data in the open fields.
- C:\Users\*username*\AppData\Local\Programs\Python\Python38 (change the variable value to match your actual installation path).
Next, find the Path entry in the System variable section, select it and then click the Edit button.
A new window will open. We will create a New entry that matches the Path variable we created in step 5 with the addition of “\Scripts” to the end of the entry like so.(C:\Users\*yourusername*\AppData\Local\Programs\Python\Python38\Scripts\
Click the OK button on all three open windows to save the entries.
We can now verify that we have completed this task successfully by opening a new administrative command prompt windows and typing in “python” (without the quotes).
We will receive a response similar to what is shown above. By following these quick steps, you’ll be able to access Python from any command prompt.
Python is one of the most popular programming languages existing today.
Our talented Support Team is full of experienced System Administrators and technicians who have intimate knowledge of multiple web hosting technologies, especially those discussed in this article.
Should you have thoughts or questions, we are always available to assist 24 hours a day, 7 days a week 365 days a year. We pride ourselves on being The Most Helpful Humans In Hosting™!
If you are a Fully Managed VPS server, Cloud Dedicated, VMWare Private Cloud, Private Parent server or a Dedicated server owner and you are uncomfortable with performing any of the steps outlined, we can be reached via phone @800.580.4985, a chat or support ticket to assisting you with this process.