Search code examples
pythonpipeasy-install

How to configure a virtual environment that doesn't require sudo?


In my Ubuntu 12.04 machine, the installation of pip requirements is asking me for sudo permission every time it attempts to install. How would I override this, as this is terrible for my working environment to install things globally instead of inside the venv?

Note: I did not setup the venv using sudo.


Solution

  • Thanks to @MartijnPieters, I found a workaround:

    Running

    ~/.virtualenvs/myapp/bin/pip install -r requirements.txt
    

    Instead of just

    pip install -r requirements.txt