Stop Homebrew Pip inserting virtualenv into / usr / local / share /

I am using python installed with Homebrew. It used to be that python brewing python placed modules in /usr/local/share/python , but this one was changed in later versions of Homebrew, so pip should put them in /usr/local/bin . But mine keeps them in /usr/local/share/python .

I updated Homebrew, uninstalled python, reinstalled it and try to install virtualenv using pip, but it continues to receive /usr/local/share/python . When I try to use it, I get:

 $ virtualenv -bash: virtualenv: command not found 

How do I get him to put things there, as it should be now?

It works for me on one machine, but not on the other, and both use the same $PATH , etc., so I'm at a dead end.

+4
source share
1 answer

I also had the same problem, but I was able to fix it using the following solution (suggested DistributionNotFound Error after updating pip ) and an additional command:

  • go to / usr / local / lib / python 2.7 / site-packages and delete:

    • simple install.pth
    • pip-1.2.1-py2.7.egg or other versions of your protocol.
    • distribute-0.6.34-py2.7.egg or other versions
  • brew rm python

  • brew uninstall python (for some reason brew rm python only python 2.7.3 is removed in my Homebrew folder. brew uninstall python allows me to remove the newest python installation in the folder)

  • brew install python

  • pip install --upgrade virtualenv

Virtualenv must be installed in / usr / local / bin if you have completed the following steps.

* If you have Macvim installed, this may cause the installation to fail. Just reinstall with brew install macvim --override-system-vim and everything will work fine.

+3
source

Source: https://habr.com/ru/post/1490247/


All Articles