Skip to content
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.

Homebrew doesn't upgrade pip / distribute on Python upgrade #20074

Closed
oryband opened this issue May 25, 2013 · 10 comments
Closed

Homebrew doesn't upgrade pip / distribute on Python upgrade #20074

oryband opened this issue May 25, 2013 · 10 comments
Labels

Comments

@oryband
Copy link

oryband commented May 25, 2013

If you upgrade to Python 2.7.5 from 2.7.3 for example, the pip script still points to 2.7.3 instead of pointing to 2.7.5. This should be done automatically.

@adamv
Copy link
Contributor

adamv commented May 25, 2013

Duplicate of #19047?

@oryband
Copy link
Author

oryband commented May 25, 2013

Maybe, but I fixed it locally pretty easily - just changed the link in pip script from 2.7.3 to 2.7.5.

@jbeezley
Copy link
Contributor

I was having a similar issue before I posted #19047. The old pip script was not removed from /usr/local/share/python on upgrade, so I removed it manually. Now, it seems to install to /usr/local/bin instead, so maybe you have the old path first in your PATH first.

@samueljohn
Copy link
Contributor

Sorry for the inconvenience. Will be fixed by #18588 which I hope to ready soon. As you can see there, a few formulae have to be checked and adapted by me before I can push that.

In short: pip will be put into the /usr/local/Cellar/python/2.7.5/bin and symlinked from there to /usr/local/bin and therefore will be removed/upgrade correctly.

@ghost ghost assigned samueljohn May 27, 2013
@ssbanerje
Copy link

I am having the same problem on the latest version of homebrew.
I do not know if this is related, but I cant start the brewed macvim from the command line when the homebrew version of python is linked. If I do a brew unlink python, everything works perfectly.

@samueljohn
Copy link
Contributor

@oryband and @jbeezley Okay, I pushed 0b50110, which fixes the issues of upgrading pip/distribute (hopefully) because pip is installed into $(brew --prefix)/bin now. So it remains in the Cellar and therefore will be upgrade. If you still have trouble, try deleting the old pip/distribute in $(brew --prefix)/lib/python2.7/site-packages. Note that share/python does no longer need to be in the PATH from now on, because python scripts go into brew --prefix, too.

@subszero MacVim should work now also. At least on my Mac. If you still have trouble, please open a separate issue. I can call :python print("it works") in MacVim successfully with brewed python 2.7.5.

I suggest to brew rm python macvim and then brew install python and brew install macvim (with the options you like). MacVim should also work with system python.

@oryband
Copy link
Author

oryband commented Jun 5, 2013

@samueljohn pip/distribute was indeed linked correctly, but I'm still getting ABRT trap 6 when using macvim with YouCompleteMe plugin (for example). This is related to macvim not linking to homebrew's Python I think.

I had to brew unlink python in order to make macvim work, and not crash. So for now I'm still back to system python.

Please re-open.

See #20075 , this, and this (external issues).

@ssbanerje
Copy link

@samueljohn I tried this and it doesn't seem to be working after the 2.7.5 update for python. Before that, I had followed the same procedure to solve the problem.

@oryband
Copy link
Author

oryband commented Jun 6, 2013

@subszero check the links in my post above you, Macvim still links to system Python. This is a Macvim bug that should be fixed I suppose. I think @samueljohn is on it. In the meanwhile you should brew unlink python to make Macvim work propely.

@samueljohn
Copy link
Contributor

For the record: MacVim works now with a brewed python to, but we had to be pretty harsh in persuading it to do so. In the --HEAD version, MacVim still does not like to use the brewed python. This is a upstream issue, since we cannot do more than setting some vars or adding flags to ./configure.

@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants