-
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
All poetry commands fail with [Errno 2] No such file or directory: 'python' #6841
Comments
It looks like you have a broken virtual environment -- I'd suggest cleaning up with |
Where is
fail with the same command |
Edit: Please ensure |
That did the trick! Had to go in manually and delete the virtualenvs in the default virtualenv directory with your command . I then was able to set Thanks for your help! |
This command deleted my teammate's entire Ubuntu partition 😄 |
|
Seems like some part of poetry is trying to run Yup, in (Seen here with Poetry 1.3.2) |
Hold on I didn't realise this issue is closed. I'll open a new one: #7456 |
To anyone else who comes here - do not run this. Totally borked my computer. |
@jove4015 Thanks for your information. |
Life saver! Thank you! |
It was very helpful for me. Thank you. |
The issue for me ended up being that I had an alias python="python3.11". Removed that and it worked again |
ON MAC what worked was reinstalling Poetry
|
or, if you use homebrew:
|
For me, the issue was that I set |
In my case, I was attempting to run AutoGPT on |
We did something like this (only we set POETRY_HOME to /etc/poetry). For some reason python was in a venv subdirectory:
Poetry install then worked and found Python.
|
I had this issue recently but only for one repository. I tried the solutions above but they didn't work for me. It turned out to be a caching issue and I ended up having to:
I worked out it was a caching issue by finding I could |
I have removed all env as you recommended - no envs left, not in the Library/Caches and not in my project (I set config virtualenvs.in-project true), however the problem remains. Where can I fix this symlink to 'python'? Thanks for your help! |
After migrating my mac to ARM I fixed it with a symbolic link. Setting an alias in zsh was not enough. |
This is the only thing that worked for me. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Environment Information
-vvv
option) and have included the output below.Stack Trace
Extra Info
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3
/Library/Frameworks/Python.framework/Versions/3.10/bin/poetry
Issue
Hello. I am trying to use Poetry for mac with Python 3.10. It was working before but I re-installed both Python and poetry and I can't seem to get it to work. I can run commands like
poetry --version
but commands such aspoetry install
poetry lock
poetry show
all faill with[Errno 2] No such file or directory: 'python'
and the above stack trace on debug mode.I have tried installing Poetry both with
curl -sSL https://install.python-poetry.org | python3 -
as well as the manual way withpip3 install poetry
. My Python is installed via the regular Python.org.pkg
installer for MacOS but I had it installed with homebrew before which also suffered from the same issue.Thank you in advance for the help!
The text was updated successfully, but these errors were encountered: