问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/30607660/pip-list-and-sudo-pip-list-shows-different-package-versions