Search code examples
python-2.7packagesudo

Why two different python environments with sudo?


Simply, when I type pip freeze to show the installed python packages, I see different packages than when I type sudo pip freeze.

Shouldn't they be the same?

I'm new to this, but from what I read that this may represent two python environments. If so, how can I disable this?


Solution

  • Use:

    which pip
    

    and:

    sudo which pip
    

    to find out if you are using the same pip command.