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.
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.
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.