Adding Python to Path

While setting up your workspace for any programming language you want to make sure you dot your 'i's and cross your 't's. This includes getting your space set up for the tasks ahead. In this article, I will be explaining and showing how to add python to path and the reason for adding python to path.

How to add python to path

Adding to path is a necessary step to take while installing python, although it can also be added manually after installation. Below are the steps to take to add python to path.

1. During installation: Python can be added to path while installing the Python package downloaded on the web by clicking on the add to path option as shown below.

e34fdae8-25e4-4d6f-8450-92fc96218161.jpg

2. Manually: adding python to path manually is done after python has been installed, probably for some reason, you skipped the part of clicking the 'add to path option' all you have to do is to go to where python is located on your system and copy the path like this the PC/local disc/user/user's_name/app data/ local/programs/python/python 3.8 (depending on the version of python on your PC).

Copy the path and go to system properties/advanced settings/environmental variables and click on new, then paste the copied path and save. After this, you can access your python on any path on your PC. To be sure that the path has been added you can use the command prompt(cmd) and type python.

da7afb1c-f9f0-419e-bc94-d5c7ac42b771.jpg

Why you need to add python to path

The main reason for adding to path is to be able to access python on any path because if you don't add python to path your CMD will assume python is not on your system and will request you download as it is shown in the image below.

49e3d006-d616-49a5-8b0e-a3f4f2fa10ec.jpg

ffc04d16-202b-413a-baee-2442718cde0a.jpg