Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip list and sudo pip list shows 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 package versions. For example, I have ipython (3.1.0) in sudo pip list and ipython (2.3.0) in just pip list. What does it mean? Do I have two both versions installed?

The reason I found out about it is because when I upgrade some of the packages, my system denied the permission, so I used sudo, did I do it wrong?

like image 853
LWZ Avatar asked Sep 28 '22 18:09

LWZ


1 Answers

The answer is pretty easy: your python environment is using different paths. do

$ which pip
$ sudo which pip

and you'll get two different paths.

Seriously consider changing over to use python virtualenv, which gets you lots better control.

like image 157
Charlie Martin Avatar answered Oct 18 '22 21:10

Charlie Martin