python-poetry / python-poetry/poetry
Poetry tries using Python2 (usr/local/bin/python) instead of the provided distribution during install
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34.3k
- Forks
- 2.5k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 30
Description
- Poetry version: Poetry (version 1.2.2)
- Python version: 3.11.0 (Poetry, Virtualenv and System shows this)
- OS version and name: Debian 11 (On WSL)
- pyproject.toml: https://gist.github.com/Taarek/3e0d5eada9102d5eb69d5145e5fc34f8#file-pyproject-toml
- I am on the latest stable Poetry version, installed using a recommended method.
- I have searched the issues of this repo and believe that this is not a duplicate.
- I have consulted the FAQ and blog for any relevant entries or release notes.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption) and have included the output below. (https://gist.github.com/Taarek/3e0d5eada9102d5eb69d5145e5fc34f8#file-debug_logs-py)
Issue
I don't have any reproducing steps, but I used to have Poetry 1.1-something, just earlier I uninstalled it to install 1.2.2.
I made sure to use python3.11 - after the curl command. But for whatever reason it still tries to use Python 2?
Whenever I try to run poetry update or poetry install it just fails with failed to query /usr/local/bin/python with code 2 err: 'No such file or directory' suddenly.
I tried searching for any existing issues, but searching for "No such file or directory" or "Wrong Python" or "Python 2" gives a ton of results, so apologies if this is a duplicate.
Edit: I did find this https://github.com/python-poetry/poetry/issues/6841 & #6371, but I tried what both the OP and the people replying suggested, and still get the same result.
Much later edit:
Doing poetry env use python3.10 then poetry install seems to work, so is this some weird Python 3.11 compatbility issue with Debian or something? (thinking about #6371) I did build Python 3.11 myself, don't remember if I did that with Python 3.10 as well.
Contributor guide
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 with the linked pyproject.toml and debug_logs_py output, then compare the behavior of poetry update and poetry install on Debian 11 under WSL with Python 3.11. Check the related issues #6841 and #6371 and use poetry env use python3.10 as the reported comparison; the issue is resolved when the provided Python distribution is selected without the missing /usr/local/bin/python error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100