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

Python 3.9.x & 3.10.x #91421

Closed
2 tasks done
GBrachetta opened this issue Dec 15, 2021 · 1 comment
Closed
2 tasks done

Python 3.9.x & 3.10.x #91421

GBrachetta opened this issue Dec 15, 2021 · 1 comment
Labels
bug Reproducible Homebrew/homebrew-core bug outdated PR was locked due to age

Comments

@GBrachetta
Copy link

GBrachetta commented Dec 15, 2021

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

`brew install pipenv`
`brew install python@3.9`

Verification

  • 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)?

Installing Pipenv installed Python 3.10 as a dependency, yet it was not discoverable (python3 --version showed the default 3.8.3 installed with MacOS Monterey).

I installed 3.9 with brew install python@3.9 and this makes 3.9 the default python3 version, but I don't see a way to make 3.10 the default one, not even after reinstalling it with brew reinstall python@3.10.

What happened (include all command output)?

brew reinstall python@3.10 (<== reinstall because it was installed as a dependency by Pipenv)

$ which -a python3 
/opt/homebrew/bin/python3
/usr/bin/python3

(Python3.9 that's it, and is the one in path being used)

$ python3 --version
Python 3.9.9

(I found no way to use the brew installation of python 3.10)

What did you expect to happen?

I expected to have python 3.10.x as the default version after that was it the last version installed with Homebrew.

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

`brew install pipenv`
`brew install python@3.9`


$ python3 --version
Python 3.9.9

brew reinstall python@3.10

$ python3 --version
Python 3.9.9

(expected to see 3.10.x as the current version)

=====

If I run brew uninstall python@3.9:

$ python3 --version
Python 3.8.3

(default Monterey version, although I installed 3.10 with Homebrew).

Where is 3.10?

@GBrachetta GBrachetta added the bug Reproducible Homebrew/homebrew-core bug label Dec 15, 2021
@bayandin
Copy link
Member

I expected to have python 3.10.x as the default version after that was it the last version installed with Homebrew.

We have python@3.9 as a default python until #87075

brew info python@3.10 says:

...
python@3.10 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.

If you need to have python@3.10 first in your PATH, run:
  echo 'export PATH="/usr/local/opt/python@3.10/bin:$PATH"' >> /Users/$USER/.bash_profile

For compilers to find python@3.10 you may need to set:
  export LDFLAGS="-L/usr/local/opt/python@3.10/lib"

For pkg-config to find python@3.10 you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/python@3.10/lib/pkgconfig"

@github-actions github-actions bot added the outdated PR was locked due to age label Jan 15, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 15, 2022
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

No branches or pull requests

2 participants