Skip to content
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

[email protected] overrides /usr/local/bin/python3 etc. installed by [email protected] #86520

Closed
2 tasks done
jwodder opened this issue Oct 5, 2021 · 2 comments
Closed
2 tasks done
Labels
bug Reproducible Homebrew/homebrew-core bug outdated PR was locked due to age

Comments

@jwodder
Copy link

jwodder commented Oct 5, 2021

brew gist-logs <formula> link OR brew config AND brew doctor output

brew config:

HOMEBREW_VERSION: 3.2.15
ORIGIN: https://github.com/Homebrew/brew
HEAD: 92749f9c5243691f8e576aa1227cb9ebba509cd4
Last commit: 2 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 7f9f35c8b47c0c7be433b608b5ca22adfd409c9b
Core tap last commit: 3 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_CLEANUP_MAX_AGE_DAYS: 1
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.RJVoZZ6LWA/org.xquartz:0
HOMEBREW_EDITOR: /usr/bin/vim
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: octa-core 64-bit icelake
Clang: 12.0.5 build 1205
Git: 2.33.0 => /usr/local/bin/git
Curl: 7.64.1 => /usr/local/Homebrew/Library/Homebrew/shims/shared/curl
macOS: 11.6-x86_64
CLT: 12.5.0.22.9
Xcode: 13.0
XQuartz: 2.8.1 => /opt/X11

brew doctor:

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
  softwareupdate --all --install --force

If that doesn't show you any updates, run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 13.0.


Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  [email protected]

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  [email protected]

  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.

What were you trying to do (and why)?

brew install [email protected]. As the python formula is still an alias to [email protected], I expected that /usr/local/bin/python3 would continue to point to 3.9 after the upgrade, with 3.10 not symlinked into PATH.

What happened (include all command output)?

  • I installed Python 3.10. Homebrew complained along the way that /usr/local/bin/python3 etc. were overwritten during the brew link step.
  • I found that the /usr/local/bin/python3 symlink and friends (pip etc.) now pointed to Python 3.10, though individual python3.9 and python3.10 programs were both available and ran the respective versions.
  • I unlinked 3.10 and relinked 3.9. python3 is now 3.9, and there is no python3.10 in the PATH.
  • I suspect that this will repeat should 3.10 receive an update before 3.9.
Tue Oct 05 ~/work$ brew install [email protected]
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
libnghttp2
==> Updated Formulae
Updated 16 formulae.
==> Updated Casks
Updated 10 casks.

==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/manifests/2021-
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/blobs/sha256:47
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/manifests/1.1.1l_1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/blobs/sha256:64d4d8
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/readline/manifests/8.1.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/readline/blobs/sha256:c596199dc
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.10/manifests/3.10.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/python/3.10/blobs/sha256:f415f1
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Installing dependencies for [email protected]: ca-certificates, [email protected] and readline
==> Installing [email protected] dependency: ca-certificates
==> Pouring ca-certificates--2021-09-30.all.bottle.1.tar.gz
==> Regenerating CA certificate bundle from keychain, this may take a while...
🍺  /usr/local/Cellar/ca-certificates/2021-09-30: 3 files, 203.5KB
==> Installing [email protected] dependency: [email protected]
==> Pouring [email protected]_1.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/[email protected]/1.1.1l_1: 8,073 files, 18.5MB
==> Installing [email protected] dependency: readline
==> Pouring readline--8.1.1.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/readline/8.1.1: 48 files, 1.6MB
==> Installing [email protected]
==> Pouring [email protected]_sur.bottle.tar.gz
Warning: These files were overwritten during the `brew link` step:
/usr/local/bin/2to3
/usr/local/bin/idle3
/usr/local/bin/pydoc3
/usr/local/bin/python3
/usr/local/bin/python3-config
/usr/local/share/man/man1/python3.1
/usr/local/lib/pkgconfig/python3-embed.pc
/usr/local/lib/pkgconfig/python3.pc
/usr/local/Frameworks/Python.framework/Headers
/usr/local/Frameworks/Python.framework/Python
/usr/local/Frameworks/Python.framework/Resources
/usr/local/Frameworks/Python.framework/Versions/Current

They have been backed up to: /Users/jwodder/Library/Caches/Homebrew/Backup
==> /usr/local/Cellar/[email protected]/3.10.0/bin/python3 -m ensurepip
==> /usr/local/Cellar/[email protected]/3.10.0/bin/python3 -m pip install -v --no-deps
==> Caveats
Python has been installed as
  /usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /usr/local/opt/[email protected]/libexec/bin

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.10/site-packages

tkinter is no longer included with this formula, but it is available separately:
  brew install [email protected]

See: https://docs.brew.sh/Homebrew-and-Python
==> Summary
🍺  /usr/local/Cellar/[email protected]/3.10.0: 3,133 files, 55.8MB
==> Upgrading 3 dependents:
imagemagick 7.1.0-8 -> 7.1.0-9, nghttp2 1.45.1 -> 1.45.1_1, unbound 1.13.2 -> 1.13.2_1
==> Downloading https://ghcr.io/v2/homebrew/core/libomp/manifests/13.0.0
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libomp/blobs/sha256:be00288f6f2
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/openexr/manifests/3.1.2
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/openexr/blobs/sha256:922846fff4
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/imagemagick/manifests/7.1.0-9
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/imagemagick/blobs/sha256:476959
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libnghttp2/manifests/1.45.1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libnghttp2/blobs/sha256:6edccdb
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/nghttp2/manifests/1.45.1_1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/nghttp2/blobs/sha256:4c27ecc896
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libnghttp2/manifests/1.45.1
Already downloaded: /Users/jwodder/Library/Caches/Homebrew/downloads/a10e8809f2b80ff379c8ac93e0e41e69e5a179b36e2ac19968bcfec8abe11b73--libnghttp2-1.45.1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/libnghttp2/blobs/sha256:6edccdb
Already downloaded: /Users/jwodder/Library/Caches/Homebrew/downloads/0ddc64f9fd99263fe024b4c46452c0f244578238ff5a2b0321e5742e8e08522e--libnghttp2--1.45.1.big_sur.bottle.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/unbound/manifests/1.13.2_1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/unbound/blobs/sha256:7f411a6ec2
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Upgrading imagemagick
  7.1.0-8 -> 7.1.0-9 

==> Installing dependencies for imagemagick: libomp and openexr
==> Installing imagemagick dependency: libomp
==> Pouring libomp--13.0.0.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/libomp/13.0.0: 9 files, 1.6MB
==> Installing imagemagick dependency: openexr
==> Pouring openexr--3.1.2.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/openexr/3.1.2: 194 files, 5.9MB
==> Installing imagemagick
==> Pouring imagemagick--7.1.0-9.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/imagemagick/7.1.0-9: 799 files, 30.3MB
Removing: /usr/local/Cellar/imagemagick/7.1.0-8... (799 files, 30.3MB)
==> Upgrading nghttp2
  1.45.1 -> 1.45.1_1 

==> Installing dependencies for nghttp2: libnghttp2
==> Installing nghttp2 dependency: libnghttp2
==> Pouring libnghttp2--1.45.1.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/libnghttp2/1.45.1: 13 files, 659.9KB
==> Installing nghttp2
==> Pouring nghttp2--1.45.1_1.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/nghttp2/1.45.1_1: 17 files, 2.2MB
Removing: /usr/local/Cellar/nghttp2/1.45.1... (23 files, 2.8MB)
Removing: /Users/jwodder/Library/Caches/Homebrew/nghttp2--1.45.1... (972.3KB)
==> Upgrading unbound
  1.13.2 -> 1.13.2_1 

==> Pouring unbound--1.13.2_1.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/unbound/1.13.2_1: 57 files, 5.7MB
Removing: /usr/local/Cellar/unbound/1.13.2... (57 files, 5.7MB)
==> Checking for dependents of upgraded formulae...
==> No broken dependents found!
==> Caveats
==> [email protected]
Python has been installed as
  /usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /usr/local/opt/[email protected]/libexec/bin

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.10/site-packages

tkinter is no longer included with this formula, but it is available separately:
  brew install [email protected]

See: https://docs.brew.sh/Homebrew-and-Python
Tue Oct 05 ~/work$ python3 -V
Python 3.10.0
Tue Oct 05 ~/work$ python3.9 -V
Python 3.9.7
Tue Oct 05 ~/work$ python3.10 -V
Python 3.10.0
Tue Oct 05 ~/work$ pip3 -V
pip 21.2.4 from /usr/local/lib/python3.10/site-packages/pip (python 3.10)
Tue Oct 05 ~/work$ brew unlink [email protected]
Unlinking /usr/local/Cellar/[email protected]/3.10.0... 24 symlinks removed.
Tue Oct 05 ~/work$ brew link [email protected]
Warning: Already linked: /usr/local/Cellar/[email protected]/3.9.7
To relink, run:
  brew unlink [email protected] && brew link [email protected]
Tue Oct 05 ~/work$ python3 -V
-bash: /usr/local/bin/python3: No such file or directory
[127]
Tue Oct 05 ~/work$ brew unlink [email protected]
Unlinking /usr/local/Cellar/[email protected]/3.9.7... 10 symlinks removed.
Tue Oct 05 ~/work$ brew link [email protected]
Linking /usr/local/Cellar/[email protected]/3.9.7... 24 symlinks created.
Tue Oct 05 ~/work$ python3 -V
Python 3.9.7
Tue Oct 05 ~/work$ python3.9 -V
Python 3.9.7
Tue Oct 05 ~/work$ python3.10 -V
-bash: /usr/local/bin/python3.10: No such file or directory
[127]
Tue Oct 05 ~/work$ pip3 --version
pip 21.2.4 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)

What did you expect to happen?

[email protected] and [email protected] should not have gotten into a slap-fight over the ownership of /usr/local/bin/python3.

Step-by-step reproduction instructions (by running brew commands)

brew install [email protected]
brew install [email protected]
@jwodder jwodder added the bug Reproducible Homebrew/homebrew-core bug label Oct 5, 2021
@branchvincent
Copy link
Member

sorry about that. #86469 should fix it

@carlocab
Copy link
Member

carlocab commented Oct 6, 2021

Fixed in #86469.

@carlocab carlocab closed this as completed Oct 6, 2021
@github-actions github-actions bot added the outdated PR was locked due to age label Nov 6, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/homebrew-core bug outdated PR was locked due to age
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants