-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[Errno 2] No such file or directory: 'python' on almost all poetry commands #4542
Comments
This is due to https://github.com/python-poetry/poetry/blob/master/src/poetry/utils/env.py#L1135 that forces the interpreter to be As a workaround, you can symlink |
Installing the latest version solved this issue. |
I'm have the same problem here:
|
Removing the cache helped for me:
|
Teenu's comment about removing the cache on a Mac worked after an OS upgrade. |
Can folks impacted by this issue on Debian try the following?
|
Same issue for me. Trying some of the workarounds suggested in the comments now.
|
Just installed poetry on Windows with WSL/Ubuntu and my problem was nothing worked. Could not even launch poetry. For some reason this worked: ~/.local/bin/poetry which then made me realize it was a path issue. Then found this on StackOverflow: export PATH="$HOME/.local/bin:$PATH" solved my problem |
It helps me: sudo apt install python-is-python3 |
There are a bunch of wildly different things tracked here -- most being local system/config issues. For the Python 3.10 on modern Debian/Ubuntu issue, the new issue is #6371. |
For anyone who might come here later - I had the same issue, and clearing out my temporary project files such as |
Closing my terminal and relaunching solved the issue for me! |
For me, I'd only installed python3 (with homebrew), so no python existed in
|
I'm going to lock this issue as it's just generating noise: the only issue related to Poetry (and not even Poetry, but in fact our dependency virtualenv and Debian patches) is linked, and all the rest is local configuration issues. |
-vvv
option).Issue
Running into an issue in which I cannot run many Poetry commands in my project (e.g.
poetry update
,poetry shell
, etc.). Tried in both zsh and bash. I get the error[Errno 2] No such file or directory: 'python'
. I initially set up this project with the default settings, but I've since changedvirtualenvs.create
andvirtualenvs.in-project
to be true. Since this change I get these errors. Deleting the .venv/ directory in the project directory does not fix the issue.Here's my current
~/.config/pypoetry/config.toml
Output of
poetry config --list
(if that helps):I've found that if I completely comment out my
~/.config/pypoetry/config.toml
file, I am then able to runpoetry shell
, which it appears to be installing in the default cache-dir directory. However, I would like to have my virtualenvs in the individual projects.Output of
poetry shell -vvv
:The text was updated successfully, but these errors were encountered: