brettcannon / python-launcher

Python launcher for Unix

Home Page:https://python-launcher.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

$PY_PYTHON is not being honoring on a brew installed py on macOS

cclauss opened this issue · comments

For the solution, please see #235 (comment)

Describe the bug
A clear and concise description of what the bug is.

I would like to configure py to use Python 3.11 as its default on my Mac...

To Reproduce
Steps to reproduce the behavior:

  1. brew install python-launcher python@3.9 python@3.10 python@3.11
  2. py --list

    3.11 │ /opt/homebrew/bin/python3.11
    3.10 │ /opt/homebrew/bin/python3.10
    3.9 │ /opt/homebrew/bin/python3.9

  3. py --version

    Python 3.9.15 # :-(

  4. export PY_PYTHON=3.11
  5. echo $PY_PYTHON

    3.11

  6. py --version

    Python 3.9.15 # :-(

Expected behavior
A clear and concise description of what you expected to happen.

  1. py --version

    Python 3.11.0

Screenshots
If applicable, add screenshots to help explain your problem.

System Details (please complete the following information):

  • OS: macOS
  • Shell: zsh
  • Launcher Version: Python Launcher for Unix 1.0.0

Additional context
Add any other context about the problem here.

SOLVED: The PYLAUNCH_DEBUG=1 trick from #108 helped me to understand that a parent directory had a venv that py was picking up. Once I updated that venv, python-launcher behaved as expected.