All Courses

How to add python to path variables

By, 3 months ago
  • Bookmark

How to add python to path variables

Path variables
2 Answers

follow this website steps are there to add it to the path variable, or you can go through the 1st session I have explained there as well, follow this website same steps are there as well


To add Python to your system's path variable on Windows:

  1. Open the Start menu and search for "Environment Variables"
  2. Click on "Edit the system environment variables"
  3. Click on the "Environment Variables" button
  4. Scroll down to the "System Variables" section and scroll down to find the "Path" variable, then click "Edit"
  5. Click "New" and enter the path to the Python installation, for example, C:\Python38\ or C:\Python38\Scripts\
  6. Click "OK" to save the changes

On Mac or Linux:

  1. Open a terminal window
  2. Type "nano ~/.bash_profile" and press enter
  3. Add the following line at the bottom of the file, replacing "/usr/local/bin" with the path to your Python installation:
export PATH="/usr/local/bin:$PATH"

4.Press "CTRL + X" to exit, then "Y" to save the changes

5.Type "source ~/.bash_profile" in the terminal to activate the changes

Please note that above steps may vary depending on the version of your OS, you may need to refer the official documentation of your OS on how to do this.

Your Answer


Live Masterclass on : "How Machine Get Trained in Machine Learning?"

Mar 30th (7:00 PM) 516 Registered
More webinars

Related Discussions

Running random forest algorithm with one variable

View More