All Courses

how to add python on path variable?

By Sde221876@gmail.com, 3 months ago
  • Bookmark
0

how to add python on path variable?

Python
Vscode
2 Answers
0
Hitendradixit18@gmail.com

search on google - how to add python to env or we have also discussed the same in the session as well you can check that out

0
Goutamp777

To add Python to the PATH environment variable on Windows:

  1. Open the Start menu and search for "Environment Variables"
  2. Click on "Edit the system environment variables"
  3. In the System Properties window, click on the "Environment Variables" button
  4. Under the "System Variables" section, scroll down and find the "Path" variable, then click on the "Edit" button
  5. Click on the "New" button, and then enter the path to the Python executable (e.g., C:\Python36\python.exe or C:\Python37\python.exe)
  6. Click on the "OK" button to close all of the windows

To add Python to the PATH on MacOS or Linux:

  1. open terminal
  2. open ~/.bash_profile or ~/.bashrc
  3. add the following line to the file export PATH="$PATH:/usr/local/bin/python3"
  4. Run source ~/.bash_profile or source ~/.bashrc

You can verify the python path is added by running echo $PATH command on terminal.

This will add the path to the Python executable to the PATH environment variable, allowing you to run Python from anywhere on your system.

Your Answer

Webinars

How To Land a Job in Data Science?

Apr 6th (7:00 PM) 190 Registered
More webinars

Related Discussions

Running random forest algorithm with one variable

View More