Home > python, ubuntu > List all installed python packages

List all installed python packages

(pip freeze | cut -d = -f 1 | grep -v FIXME | xargs echo | tr ' ' '\n' >list.txt) 2>/dev/null

The list is written to “list.txt”, one package per line. This tip is based upon this thread. This version removes FIXME lines and warnings.

I want to figure out how to upgrade all those packages that I installed via “pip install”. The thread above proposes to execute “pip install -U” on the list of packages. However, it will upgrade every python package, even the ones that were installed with apt-get (or Synaptic, etc.). Apt-get builds a database that contains every file on the system. If “pip install -U” replaces those files, I’m afraid apt-get will panic. This is something to be investigated.

About these ads
  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.
Follow

Get every new post delivered to your Inbox.

Join 63 other followers

%d bloggers like this: