I didn't create my virtualenv using sudo. So Sebastian's answer didn't apply to me. My project is called utils
. I checked utils
directory and saw this:
-rw-r--r-- 1 macuser staff 983 6 Jan 15:17 README.md
drwxr-xr-x 6 root staff 204 6 Jan 14:36 utils.egg-info
-rw-r--r-- 1 macuser staff 31 6 Jan 15:09 requirements.txt
As you can see, utils.egg-info
is owned by root
not macuser
. That is why it was giving me permission denied
error. I also had to remove /Users/macuser/.virtualenvs/armoury/lib/python2.7/site-packages/utils.egg-link
as it was created by root
as well. I did pip install -e .
again after removing those, and it worked.