Skip to main content

Command Palette

Search for a command to run...

Installing Python packages with pip

Updated
1 min read
Installing Python packages with pip
C

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:

More from this blog

D

Datawise: A blog on SQL, BigQuery, Analytics, Python Tips and Tricks

204 posts

Data Engineer with a passion for transforming complex data landscapes into insightful stories. Here on my blog, I share insights, challenges, and the ever-evolving dance of technology and business.