🎓 All Courses | 📚 Python Programming Syllabus

📋 Study this course on TaskLoco
#python-programming#pip#virtual-environments

Virtual Environments — Isolate Your Projects

Every Python project should have its own virtual environment to avoid dependency conflicts.


Create & activate:

# Create
python -m venv venv

# Activate (Mac/Linux)
source venv/bin/activate

# Activate (Windows)
venv\Scripts\activate

# Deactivate
deactivate

pip — Python package manager:

pip install requests          # install package
pip install requests==2.28.0  # specific version
pip install -r requirements.txt  # install from file
pip uninstall requests        # remove package
pip list                      # show installed
pip freeze                    # show with versions

requirements.txt — share your dependencies:

pip freeze > requirements.txt  # save
pip install -r requirements.txt  # restore

Best practice: Never install packages globally. Always activate your venv first. Add venv/ to your .gitignore.


YouTube • Top 10
Python Programming: Virtual Environments & pip
Tap to Watch ›
📸
Google Images • Top 10
Python Programming: Virtual Environments & pip
Tap to View ›

Reference:

Wikipedia: pip

image for linkhttps://en.wikipedia.org/wiki/Pip_(package_manager)

📚 Python Programming — Full Course Syllabus
📋 Study this course on TaskLoco

TaskLoco™ — The Sticky Note GOAT