DEV Community

Cover image for Python pip, what's installed?
petercour
petercour

Posted on

Python pip, what's installed?

You probably use pip thousands of time if you are programming Python. pip is the package installer for Python. You can use pip to install packages from the Python Package Index and other indexes.

When creating a Python project, you do so in a virtual environment (or maybe you don't?).

pip install your_module
Enter fullscreen mode Exit fullscreen mode

Then you install packages for your project. So how do you know what all the installed modules are?

Easy, there's a command

pip list
Enter fullscreen mode Exit fullscreen mode

So if you want to know which version of a module you have, combine with grep.

λ  ~  pip list | grep 'tensorflow'
tensorflow (1.14.0)
tensorflow-estimator (1.14.0)
Enter fullscreen mode Exit fullscreen mode

If you are using Ubuntu Linux or similar, you may have the odd situation in which you have both pip, pip3, python and python3 installed. Did the Ubuntu creators have some evil plan?

In that case, just add 3 after the pip command. For other operating systems, you can just use Python and pip.

Related links:

Top comments (0)