-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pip missed after upgrading both python2 and python3 #5419
Comments
> brew postinstall python3 -v
==> Using the sandbox
/usr/bin/sandbox-exec -f /tmp/homebrew20161001-36280-ag6wb6.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/postinstall.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/python3.rb -v
==> Sandbox log
Oct 1 19:55:54 kernel[0]: Sandbox: ruby(36281) deny(1) file-write-create /usr/local/Homebrew/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages
Error: Operation not permitted - (../../../../../../../../../../lib/python3.5/site-packages, /usr/local/Homebrew/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages)
> ll /usr/local/Homebrew/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages
ls: /usr/local/Homebrew/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages: No such file or directory
>
> mkdir /usr/local/Homebrew/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages
> ll /usr/local/Homebrew/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/lib/python3.5 | grep site-packages
drwxr-xr-x 2 haodong admin 68B Oct 1 19:57 site-packages
> brew postinstall python3 -v
==> Using the sandbox
/usr/bin/sandbox-exec -f /tmp/homebrew20161001-36466-167ihk0.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/postinstall.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/python3.rb -v
==> Sandbox log
Oct 1 19:58:02 kernel[0]: Sandbox: ruby(36467) deny(1) file-write-unlink /usr/local/Homebrew/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages
Oct 1 19:58:02 kernel[0]: Sandbox: ruby(36467) deny(1) file-write-unlink /usr/local/Homebrew/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages
Error: Operation not permitted - /usr/local/Homebrew/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages |
i just tried #1415 (comment) but useless. > ll /usr/local/lib | grep python
drwxr-xr-x 3 haodong admin 102B Aug 20 18:16 python2.7
drwxr-xr-x 4 haodong admin 136B Oct 1 19:54 python3.5
> rm -rf /usr/local/lib/python*
> brew update
> brew install python
...
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall python`
...
> brew postinstall python -v
==> Using the sandbox
/usr/bin/sandbox-exec -f /tmp/homebrew20161001-52694-mibrur.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/postinstall.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/python.rb -v
==> Sandbox log
Oct 1 20:04:54 kernel[0]: Sandbox: ruby(52695) deny(1) file-write-create /usr/local/Homebrew/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Error: Operation not permitted - (../../../../../../../../../../lib/python2.7/site-packages, /usr/local/Homebrew/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages)
>
> mkdir /usr/local/Homebrew/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
> ll /usr/local/Homebrew/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7 | grep site-packages
drwxr-xr-x 2 haodong admin 68B Oct 1 20:05 site-packages
> brew postinstall python -v
==> Using the sandbox
/usr/bin/sandbox-exec -f /tmp/homebrew20161001-52852-1obg6pn.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/postinstall.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/python.rb -v
==> Sandbox log
Oct 1 20:06:09 kernel[0]: Sandbox: ruby(52853) deny(1) file-write-unlink /usr/local/Homebrew/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Oct 1 20:06:09 kernel[0]: Sandbox: ruby(52853) deny(1) file-write-unlink /usr/local/Homebrew/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Error: Operation not permitted - /usr/local/Homebrew/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages |
|
|
mabye i install pip from https://pip.pypa.io not homebrew then? i install openssl and alot of brew broke.... |
Same happened to me (in python3), but I first tried
|
@Bilkow You're lucky. I got:
|
I have the same issue as #5419 (comment) when running
However, I've fixed that by running
|
I ran in to the same issue with the same symptoms, and bilkow's fix worked for me. Mac OS 10.11. |
+1 on bilkow's solution |
I believe this is related to Homebrew/brew#1101; sandbox log has:
cc @MikeMcQuaid |
@tdsmith I've opened Homebrew/brew#1261 and Homebrew/brew#1262 to address this. Relatedly, everyone in this thread seems to have a |
@MikeMcQuaid I guess this explains why some have not managed to fix it, but not why/how pip[3] has gone missing. |
@Bilkow I have. |
I had same problem that |
|
For myself: |
We can't really consider reinstall the whole system as a solution, I think... |
Yes, and not helpful. It's frustrating. |
As far as I can remember, the default pip is pip2(pip of python2), right? |
However one thing still bothers me is whether the installed packages are still existing somewhere or just been removed with the upgrade? |
I have the same problem & none of these solutions solved my issue, any clue how to fix it, reinstalling the OS is not an option. |
@ahmedelgabri please open a new issue and complete the issue template if you're having a problem. |
Please follow the general troubleshooting steps first:
brew update
and retried your prior step?brew doctor
, fixed as many issues as possible and retried your prior step?sudo chown -R $(whoami) $(brew --prefix)
?Bug reports:
pip lost after upgrading python.
pip3 lost after upgrading python3.
Although brew notices me to run
brew postinstall python
&brew postinstall python3
, these commands failed to execute.brew gist-logs python
result herebrew gist-logs python3
result hereThe text was updated successfully, but these errors were encountered: