Peak list and sudo pip list show different package versions
I have a Mac, I installed Python with Homebrew
and I installed packages with pip
. But I found out when I call pip list
and sudo pip list
, it actually gives different versions of the packages. For example, I have ipython (3.1.0) in sudo pip list
and ipython (2.3.0) for only pip list
. What does it mean? Do I have both versions?
The reason I found out about this is because when I update some packages my system denied permission, so I used sudo
, did I do it wrong?
The answer is pretty simple: your python environment uses different paths. to do
$ which pip
$ sudo which pip
and you get two different paths.
Consider seriously switching to using python virtualenv, which will make your management much easier.