Skip to main content

Setting environmental variables in python

Ref Video--https://www.youtube.com/watch?v=91SGaK7_eeY


✅ Purpose of Adding Python to System Environment Variables

1. Run Python from Any Command Line Location

  • When Python’s installation directory is added to the PATH, you can run python or python3 from any folder in Command Prompt or PowerShell.
  • Without it, you'd need to navigate to the Python installation directory every time.

2. Enable Python Scripts and Tools Globally

  • Tools like pip, virtualenv, or other Python-based CLI utilities can be run directly.
  • Example: pip install requests works globally if Scripts folder is in PATH.

3. Support for IDEs and Build Tools

  • Some IDEs (like VS Code or PyCharm) and build systems rely on the system PATH to locate Python.
  • Ensures smoother integration and fewer configuration issues.

4. Avoid “Python Not Found” Errors

  • If Python isn’t in the PATH, you’ll get errors like:
    'python' is not recognized as an internal or external command
The Spyder IDE does not directly rely on the system PATH variable to locate Python. Instead, it uses the Python interpreter from the environment in which Spyder is installed—typically a Conda environment or a standalone installation.

 STEP-1

  • Find the location of the Python File

STEP-2

Copy the directory of the .exe file and scripts folder where pip lies

C:\Users\karth\AppData\Local\Programs\Python\Python313

C:\Users\karth\AppData\Local\Programs\Python\Python313\Scripts

STEP-3

Go to Environmental variables --> Under system variables ->Click Path-> Edit 


STEP-4

click New-> Paste the path of python and scripts folder and click ok as shown below





STEP-5

To verify, open the command prompt and run python --version







Comments

Popular posts from this blog

Convex Lens Vs Concave Lens

What is a Lens A lens is a transparent object that transmits light across it, and its working principle depends on the   law of refraction (Snell’s law) . Applications: Concave Lens help with Far-Sight Convex Lens help with Near-Sight

Herbal Plants

Herbal plants to grow in home Different types of keerai ----- http://www.indiandietrecipes.com/2016/03/pictures-of-various-types-of-greens-or.html Pirandai ----good for bone joins---- https://youtu.be/k2DGubyXLAE Valarai Keerai Benifits ----- https://youtu.be/33HIfLJKTqA Sesma seeds ---- https://easyayurveda.com/2011/02/24/sesame-and-sesame-oil-benefits-total-ayurveda-details/

What is Verbal and Non-Verbal communication

TYPES OF COMMUNICATIONS: