Javatpoint Logo
Javatpoint Logo

SETTING PATH IN PYTHON

Before starting working with Python, a specific path is to set.

  • Your Python program and executable code can reside in any directory of your system, therefore Operating System provides a specific search path that index the directories Operating System should search for executable code.
  • The Path is set in the Environment Variable of My Computer properties:
  • To set path follow the steps:

Right click on My Computer ->Properties ->Advanced System setting ->Environment Variable ->New

In Variable name write path and in Variable value copy path up to C://Python(i.e., path where Python is installed). Click Ok ->Ok.

Path will be set for executing Python programs.

1. Right click on My Computer and click on properties.

2. Click on Advanced System settings

pythonpath1

3. Click on Environment Variable tab.

pythonpath1

4. Click on new tab of user variables.

pythonpath1

5. Write path in variable name

pythonpath5

6. Copy the path of Python folder

pythonpath5

7. Paste path of Python in variable value.

pythonpath7

8. Click on Ok button:

pythonpath7

9. Click on Ok button:

pythonpath7
Next TopicPython Example




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA