Can't pip install virtualenv in OS X 10.8 with brewed python 2.7

前端 未结 5 778
隐瞒了意图╮
隐瞒了意图╮ 2020-12-09 06:00

When trying to install virtualenv using a brewed python, I get the following error:

$ pip install virtualenv
Requirement already satisfied (use --upgrade to          


        
5条回答
  •  [愿得一人]
    2020-12-09 06:42

    I had the same problem and I managed to solve it by uninstalling any brew versions of Python and virtualenv

    brew uninstall python
    brew uninstall pyenv-virtualenv
    

    Manually moving all the virtualenv* files I found under /usr/local/bin to another folder

    sudo mkdir /usr/local/bin/venv-old
    sudo mv /usr/local/bin/virtualenv* /usr/local/bin/venv-old/
    

    Opening a new terminal tab and double-checking that I'm in a clean state

    which python # => /usr/bin/python
    which virtualenv # => virtualenv not found
    

    And installing Python and virtualenv(wrapper) cleanly using the recommended method (here and here):

    brew install python --with-brewed-openssl
    # Open a new terminal tab now (to access /usr/local/bin/python)
    pip install virtualenv
    pip install virtualenvwrapper
    

提交回复
热议问题