python-poetry / python-poetry/install.python-poetry.org
Poetry environment breaks when Homebrew upgrades Python on MacOS
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 255
- Forks
- 65
- Avg merge
- 2h 48m
- Merged PRs (30d)
- 1
Description
Issue experienced in Poetry 1.2.1
Python version 3.10.6_2 -> 3.10.7 and 3.10.7 -> 3.10.8 upgrades
OS version MacOS 12.6
(not project-specific so no pyproject.toml)
Issue
Poetry commands cease working and throw errors after upgrading the installed Python version using Homebrew. This has occurred the last two times (3.10.6_2 upgrade to 3.10.7 and 3.10.7 upgrade to 3.10.8) using brew upgrade which included the two Python updates. Afterward, attempting to use any Poetry command fails with error output similar to the following:
poetry --version
dyld[42062]: Library not loaded: '/usr/local/Cellar/python@3.10/3.10.7/Frameworks/Python.framework/Versions/3.10/Python'
Referenced from: '/Users/keith/Library/Application Support/pypoetry/venv/bin/python'
Reason: tried: '/usr/local/Cellar/python@3.10/3.10.7/Frameworks/Python.framework/Versions/3.10/Python' (no such file), '/Library/Frameworks/Python.framework/Versions/3.10/Python' (no such file), '/System/Library/Frameworks/Python.framework/Versions/3.10/Python' (no such file)
zsh: abort poetry --version
In both cases, the only Python installations available are system packages (if these even still exist) or those installed by Homebrew. Poetry has only been installed via the recommended curl -sSL https://install.python-poetry.org | python3 - command. The only way I've found to restore Poetry functionality after brew upgrade is to uninstall via the same recommended script i.e. curl -sSL https://install.python-poetry.org | python3 - --uninstall and then to reinstall Poetry
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with the recommended install script and a Homebrew Python upgrade, then inspect how the installed Poetry environment references the Python framework. Verify the result with poetry --version after an upgrade and confirm that Poetry remains usable without uninstalling and reinstalling it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100