Installing Python packages with pip

Senior Data Engineer • Contractor / Freelancer • GCP & AWS Certified
Here are the basics you need to know about installing Python packages.
Apart from the built-in modules that come by default with the Python installation (the Standard Library), you need to install third-packages packages to be able to use them in your code (and of course import them).
You do so with a package manager. Perhaps the most widely known is pip, but there are other options like poetry or uv.
You can check more information about Python packages at pypi.org
Here's a quick list of common use cases:
➡ pip install pandas # installs the package and its dependencies
➡ pip uninstall pandas # removes the package
➡ pip install --upgrade pandas # upgrades a package
➡ pip list # lists installed packages
➡ pip freeze > requirements.txt # saves the list of installed packages to a file so you can recreate the environment with the same packages next time you need it
Found it useful? Subscribe to my Analytics newsletter at notjustsql.com.
Enjoyed this? Here are some related articles you might find useful:





