Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Update python3.rb #21884

Closed
wants to merge 1 commit into from
Closed

Update python3.rb #21884

wants to merge 1 commit into from

Conversation

wlbentley
Copy link

I believe the update recommendation should read "pip3 install --upgrade pip3" instead of "pip3 install --upgrade pip", no? Running it against "pip" gives the error messages in Gist https://gist.github.com/wlbentley/6228268 .

Thanks.

I believe the update recommendation should read "pip3 install --upgrade pip3" instead of "pip3 install --upgrade pip", no? Running it against "pip" gives the error messages in Gist https://gist.github.com/wlbentley/6228268 .

Thanks.
@MikeMcQuaid
Copy link
Member

@samueljohn Ping.

@samueljohn
Copy link
Contributor

No, the module is named pip for all Python versions. The executable script is pip and we rename it to pip3 instead of pip for Python3 so both pip fro Python 2.x and pip3 for Python 3.x can coexist.

Your problem here is one of the pip bugs ... or at least inconveniences regarding handling of temp dirs. Delete that temp dir from an (aborted) previous installation as the text suggests:

This is likely due to a previous installation that failed.
pip is being responsible and not assuming it can delete this.
Please delete it and try again.

Thanks for your input - I hope deleting that dir fixes the issue for you. If not we'll reopen, k?

@samueljohn samueljohn closed this Aug 14, 2013
@wlbentley
Copy link
Author

Thank you so much for your helpful explanation. I'm a bit new to homebrew,
and error messages filled with long and complex paths/urls still intimidate
me, apparently.

The instructions are clear, though, and I'm sure it will work when I try
again.

Your explanation also is helping me grok how homebrew works.

Thanks again for taking the time to explain.

Wm Bentley

On Wed, Aug 14, 2013 at 2:38 AM, Samuel John notifications@github.comwrote:

No, the module is named pip for all Python versions. The executable
script is pip and we rename it tohttps://github.com/mxcl/homebrew/blob/master/Library/Formula/python3.rb#L159
pip3 instead of pip for Python3 so both pip fro Python 2.x and pip3 for
Python 3.x can coexist.

Your problem here is one of the pip bugs ... or at least inconveniences
regarding handling of temp dirs. Delete that temp dir from an (aborted)
previous installation as the text suggests:

This is likely due to a previous installation that failed.
pip is being responsible and not assuming it can delete this.
Please delete it and try again.

Thanks for your input - I hope deleting that dir fixes the issue for you.
If not we'll reopen, k?


Reply to this email directly or view it on GitHubhttps://github.com//pull/21884#issuecomment-22624568
.

@samueljohn
Copy link
Contributor

welcome to the party 🍻

@wlbentley
Copy link
Author

Hi Samuel,

I'm attempting to reinstall both python and python3 using homebrew. So far
I can't even reinstall python.

(Is this the best place to pursue this issue?)

  1. I uninstalled both python (2.7.5) and python3 (3.3.2) and virtualenv
    using homebrew "uninstall --force".
  2. After uninstalling, I reset permissions in /usr/local using "sudo
    chown -R whoami /usr/local" (as described here:
    http://stackoverflow.com/questions/13088998/homebrew-python-installing)
    This was in response to a permissions error in a previous install.
  3. "rm -rf brew --cache"
  4. "brew prune"
  5. Just to be sure: "brew cleanup --force"
  6. Then: "brew doctor" ...ready to brew.
  7. "brew install python" no errors.
  8. "pip install --upgrade setuptools" no errors
  9. "pip install --upgrade pip" fails due to a temporary directory
    (this Gist: https://gist.github.com/wlbentley/6247503 )
  10. "rm -rf
    /private/var/folders/hw/fyzn1b748xj2vc0059_vq3lr0000gr/T/pip-build-william/pip"
    removes it.
  11. "pip install --upgrade pip" again fails, this time due to
    permissions on "/usr/local/bin/pip" (this Gist:
    https://gist.github.com/wlbentley/6247526 )
  12. "sudo chown -R whoami /usr/local/bin/pip" [permission is
    "lrwxr-xr-x"]
  13. "pip install --upgrade pip" again fails due to a temporary
    directory

I seem to be in a loop of steps 9-12.

Just tried installing python3 and failed at the same step (9: "pip install
--upgrade pip"). Gist here:
https://gist.github.com/wlbentley/6247573 This after a clean (?) new
install of python3.

Any suggestions? Any other resources I can/should consult?

OS X 10.8.4 on a new MacBook Pro.

Thanks in advance for any help you might offer.

Wm Bentley

On Wed, Aug 14, 2013 at 2:38 AM, Samuel John notifications@github.comwrote:

No, the module is named pip for all Python versions. The executable
script is pip and we rename it tohttps://github.com/mxcl/homebrew/blob/master/Library/Formula/python3.rb#L159
pip3 instead of pip for Python3 so both pip fro Python 2.x and pip3 for
Python 3.x can coexist.

Your problem here is one of the pip bugs ... or at least inconveniences
regarding handling of temp dirs. Delete that temp dir from an (aborted)
previous installation as the text suggests:

This is likely due to a previous installation that failed.
pip is being responsible and not assuming it can delete this.
Please delete it and try again.

Thanks for your input - I hope deleting that dir fixes the issue for you.
If not we'll reopen, k?


Reply to this email directly or view it on GitHubhttps://github.com//pull/21884#issuecomment-22624568
.

@samueljohn
Copy link
Contributor

Ok I'll try to reproduce.

@wlbentley
Copy link
Author

Ok, I see now that the two "pip install --upgrade" steps are in fact not necessary. For some reason I thought they were a necessary continuation of the installation process. So... for my purposes, python & python3 are installing correctly, and I'm good to go.

And that changes the scope of the errors I was getting: This now seems like a "pip install --upgrade pip" issue. (The setuptools upgrade finished without an error.) Perhaps because the installed version of pip is already the latest version? Or perhaps there are other problems with pip self upgrades in a homebrew environment?

So, I'm ready to move on with python and python3 and leave this with you. I don't expect to be upgrading pip again for a while, but will keep watching this thread. And if I notice any other similar pip problems, I'll let you know? If you need more info about my current setup, I'll be happy to help.

I hope this is helpful.

Thanks.

@samueljohn
Copy link
Contributor

Thanks, I haven't had time to investigate further. I wanted to check the pip issues (they are also on github) but there are so many open issues still.

@samueljohn
Copy link
Contributor

I can confirm that pip install --upgrade pip (and setuptools) for a brewed python is not working. And we don't need that, as brew provides an up-to-date pip and setuptools when brew install python. Properly upgrading pip/setuptools, would require a complicated command like pip install --upgrade --install-option "--install-scripts=$(brew --prefix)/Cellar/python/2.7.5/bin" --install-option "--install-lib=$(brew --prefix)/lib/python2.7/site-packages" pip but you have to chmod +w $(brew --prefix)/Cellar/python/2.7.5/bin/pip* first. Perhaps you'll also have to brew unlink python and brew link python. This is too complicated and the benefit of doing this is small.

Because of this, homebrew does not like tools updating themselves. So, I removed the hint how to upgrade pip/setuptools from the caveats. 955b8fa

@zuxfoucault
Copy link

By the way, type "brew info Python3" in terminal, these massages still exist.


Setuptools and Pip have been installed. To update them
pip3 install --upgrade setuptools
pip3 install --upgrade pip

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

Successfully merging this pull request may close these issues.

None yet

4 participants