Python Full Tutorial — Part 12

Professional Python projects never use global dependencies. They use virtual environments.

1. What is pip?


pip install requests
  

2. What is a Virtual Environment?

An isolated Python environment per project.

3. Creating a Virtual Environment


python -m venv venv
  

4. Activating Environment


# Windows
venv\Scripts\activate

# Linux / macOS
source venv/bin/activate
  

5. Installing Packages Inside venv


pip install flask
  

6. requirements.txt


flask
requests
  

pip install -r requirements.txt
  

7. Why This Matters

Key Takeaway

If you skip virtual environments, you are not ready for production Python.

Next step: Mini Project using everything learned

Disclaimer:
Always isolate environments when working on real projects.