pip list and sudo pip list shows different package versions

我的未来我决定 提交于 2020-01-14 14:50:11

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!