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 runpythonorpython3from 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 requestsworks globally ifScriptsfolder is inPATH.
3. Support for IDEs and Build Tools
- Some IDEs (like VS Code or PyCharm) and build systems rely on the system
PATHto 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
Comments
Post a Comment