What is the standard tool for installing Python packages?
pip (often recursively defined as “Pip Installs Packages”). It’s the Python package installer and is included with modern Python distributions.
What is the most basic command to install a package named requests?
pip install requests
What command do you use to install a specific version of a package, like version 1.5 of pandas?
pip install pandas==1.5
How do you upgrade an already installed package (e.g., numpy) to its latest version?
pip install --upgrade numpy
How do you install packages listed in a requirements.txt file?
pip install -r requirements.txt
How do you uninstall a package (e.g., requests)?
pip uninstall requests
What is the command to list all packages currently installed in the active environment?
pip list or pip freeze (which is better for generating requirements files).
What does the -e flag mean when installing a package?
It means “editable” or “development” mode. pip install -e . installs the package locally from your current project directory, allowing changes to the source code to take immediate effect.