Sep 30, 2024
pip install <package_name>
installs packages globally.pip install <package_name>==<version>
installs a specific version.pip install --upgrade <package_name>
updates packages.pip uninstall <package_name>
removes packages.pip list
shows all globally installed packages.pip freeze > requirements.txt
lists all packages and versions into a requirements file.python -m venv <environment_name>
creates a new virtual environment.source <environment_name>\Scripts\activate
source <environment_name>/bin/activate
deactivate
exits the virtual environment.pip
commands apply only to the virtual environment.requests
, python-dotenv
).requirements.txt
file..env
file to manage secrets..env
file.venv
and .env
from version control.