HiveBrain v1.2.0
Get Started
← Back to all entries
patternpythonCriticalCanonical

Find which version of package is installed with pip

Submitted by: @import:stackoverflow-api··
0
Viewed 0 times
withpackagepipfindinstalledwhichversion

Problem

Using pip, is it possible to figure out which version of a package is currently installed?

I know about pip install XYZ --upgrade but I am wondering if there is anything like pip info XYZ. If not what would be the best way to tell what version I am currently using.

Solution

As of pip 1.3, there is a pip show command.

$ pip show Jinja2
---
Name: Jinja2
Version: 2.7.3
Location: /path/to/virtualenv/lib/python2.7/site-packages
Requires: markupsafe


In older versions, pip freeze and grep should do the job nicely.

$ pip freeze | grep Jinja2
Jinja2==2.7.3

Code Snippets

$ pip show Jinja2
---
Name: Jinja2
Version: 2.7.3
Location: /path/to/virtualenv/lib/python2.7/site-packages
Requires: markupsafe
$ pip freeze | grep Jinja2
Jinja2==2.7.3

Context

Stack Overflow Q#10214827, score: 1746

Revisions (0)

No revisions yet.