osx install packages inside virtualenv
Question: I tried to start virtualenv WITHOUT sudo but unfortunately it cannot find
(Permission denied) /lib/python2.7/site-packages/easy_install.py. So I did:

    
    
    sudo virtualenv name_env
    

The problem is that now pip is the global version (not inside pip): which pip:
/usr/local/bin/pip So I cannot install any package inside the environment. If
I start virtualenv without sudo:

    
    
    virtualenv name_env
    

OSError: Command /Users/andrea/package_lambda/bin/python2.7 -c "import sys,
pip; sys...d\"] + sys.argv[1:]))" setuptools pip wheel failed with error code
2 Any suggestion?


Answer: Don't use `sudo` just because you can!

I suggest you install another Python environment using `brew`, and then
install `pip`, and subsequently `virtualenv`. This way, you'll substantially
correct the underlying problem.

I would follow this method:

    
    
    brew install pyenv
    
    pyenv install 2.7.11
    

Or check the available versions through:

    
    
    pyenv versions
    

This way, you can install different versions and switch between them as you
wish, for instance:

    
    
    pyenv global 2.7.11
    

And then you can install `pip` like so:

    
    
    python -m easy_intall pip
    

and then install `virtualenv` like so:

    
    
    python -m pip install virtualenv
    

