Skip to content

How to add python PATH in Windows or Linux?

Python – Environment Setup

How to add python PATH in Windows platforms or Linux ?” After downloading Python, If you start coding in PyCharm then you will show a path error i.e. “Python is not recognized as an internal or external command“. It is also required to add python 3.8 path in windows / Linux.

Python is available on various platforms like Linux and MAC OS X. so let’s understand how to set up your Python Environment Variable.

Local Environment Setup

To open a terminal window and then type “Python” to find out if it is already installed and which version is installed.

  • Unix (Solaris, Linux, FreeBSD, AIX, SunOS, RIX)    

  • Win 9X / NT / 2000    

  • Macintosh (Intel, PPC, 68K)    

  • OS/2    

  • DOS    

  • Windows CE    

  • Palm OS    

How to Setting Up PATH ?

The programs and other executable files can be in many directories, so operating systems provide a search PATH that lists the directories that the OS searches for executable.

The PATH is stored or picked in an environment variable, which is named string maintained by the operating system. This variable contains the information available to the command shell and the other programs.

The PATH variable is named as PATH in windows platform (Unix is case sensitive; Windows is not).

In MAC OS, the installer controls the PATH details. To call the python interpreter from any particular directory, then you should add the python directory to your PATH.

How to add Python 3.8 to PATH Windows 10 ?

To add the python directory to the PATH for a particular session in Unix are :

  • In the csh shell : You have to type setenv “$ PATH : / usr / local / bin / python” and then press enter.

  • In the bash shell (Linux) : You have to type export PATH= “$ PATH : / usr / local / bin / python” and then press enter. 

  • In the sh or ksh shell : You have to type PATH= “$ PATH : / usr / local / bin / python” and then press enter.

NOTE : / usr / local / bin / python is the path of the python directory.

How to add Python 3.8 to PATH Windows 10 ?

After installed Python in Windows 10 from , then you have to follow the Procedure to set PATH of interpreter for command prompt below:

1. In the Search bar, search IDLE.


2. Right click on IDLE and then open file location.

3. Right click on shortcut, and again open file location.

4. Get PATH from address bar.

5. Copy PATH.

6. Right click on This PC and then Click on properties.


7. Then click on Advanced System Settings.


8. Then click on Environment Variables.


9. Click on New.


10. Then, you have to write your PATH name and paste address.


To add more PATH’s in existing PATH we have to use colon( : ) after one path and paste another path address. Both of them will work properly.