I can't figure out the proper way to setup pip on my Mac. I installed python@2 on Homebrew. When I try to install virtualenv, I get this error:
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/lib/python2.7/site-packages/virtualenv.pyc'
Consider using the `--user` option or check the permissions.
Here's some extra diagnostic info that may be helpful.
Jacobs-MacBook-Pro:~ jacob$ pip -V
pip 19.0.3 from /usr/local/lib/python2.7/site-packages/pip (python 2.7)
Jacobs-MacBook-Pro:~ jacob$ python -m pip -V
pip 19.1.1 from /Users/jacob/Library/Python/2.7/lib/python/site-packages/pip (python 2.7)
Jacobs-MacBook-Pro:~ jacob$ which python
/usr/local/bin/python
Jacobs-MacBook-Pro:~ jacob$ ls -l /usr/local/bin/python
lrwxr-xr-x 1 jacob admin 36 Jun 19 15:36 /usr/local/bin/python -> ../Cellar/python@2/2.7.16/bin/python
There's many opinions on the web how to set it up. Some of them are old, like using easy_install
, which seems to be deprecated. I tried some different methods, but haven't gotten it to work.
What am I missing?