Working inside a vagrant environment, inside a python virtual environment, when I try to install a python package using
(venv) vagrant@vagrant-ubuntu-trusty
Like Daniel said in comments, you should fix the permissions issue with your virtual environment directory. It could be that you already installed something in that directory with sudo. Or you created it with sudo. Which is not ideal. I recommend destroying the virtualenv and then creating it again with the vagrant user. If you are using pyvenv
, make sure you pass --copies
option.
As user27... said in their answer, the pip you run with sudo is probably not the same pip you run as vagrant user. You can always check that with which pip
.
I'd recommend starting with which python
inside your python virtual environment. Perhaps you have activated the wrong virtual environment, not related to your vagrant user at all.