Getting Started with Python Virtual Environments
dependenciespythonvirtualenv
Introduction
Python virtual environments are essential for managing project dependencies. This guide covers the basics of creating and using virtual environments.
Why Use Virtual Environments?
- Isolate project dependencies
- Avoid version conflicts
- Keep your global Python installation clean
Creating a Virtual Environment
python -m venv myenv
source myenv/bin/activate
Installing Packages
Once activated, use pip:
pip install requests flask