-
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
Ubuntu 20.04 without python-as-python3 apt package errors No such file or directory: 'python' #4416
Comments
Hello @christopherpickering, how did you install poetry? fin swimmer |
Hi @finswimmer, heres how: curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | $(which python3) - It installs fine. |
Thanks for your response! I'm able to reproduce it. It seems to be due to a change in poetry 1.1.8. I have no problems with 1.1.7. I guess #4414 is somehow related. |
I have this issue as well |
I can confirm this too in Alpine 3.13.5. I didn't lock poetry to a specific version in our build pipeline and started seeing the following error:
Poetry is installed into the Alpine image using |
Same problem on Centos 8 since the release of 1.1.8 |
Same issue on DietPi v7.5 (Debian Bullseye), adding an alias for |
Same issue on my Linux mint 20 |
The same problem shows up in older Ubuntu 18.04 (bionic), but there's no |
I think I have the same on an Alpine docker container with Python 3.6 and Poetry 1.1.8 installed:
Installing Poetry 1.1.7 instead leads to:
Not knowing what the latter is about, but the python error has obviously gone when using Poetry 1.1.7 instead of Poetry 1.1.8. |
Might be a little bit irrelevant but I want to ask, I wrote some scripts using Python 3.9 and pyproject.toml list it as a dependency. |
@regunakyle: |
Windows 10 with Ubuntu 20.04 WSL - same issue. Installing older version solves this for me.
|
I have the same problem with poetry 1.1.8 in my Zorin 16 (ubuntu 20.04 and python 3.8). I Installed poetry using: curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python - I can run "poetry --version", "poetry check", "poetry init", but "poetry shell" and "poetry debug" are pretty much useless. The error i get is: $ poetry debug
Poetry
Version: 1.1.8
Python: 3.8.10
FileNotFoundError
[Errno 2] No such file or directory: 'python' I have not found any working fixes yet. |
I'm seeing this on Debian (unstable) too. I installed Poetry with:
Thing is, while If I explicitly put the venv into the PATH, then poetry works fine (i.e., invoke it as
I think Poetry should instead use
|
Should be fixed via #4507 |
Thanks! |
(WSL) i seem to still get this issue after installing today via curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - reinstalling python3.9 does not seem to resolve /usr/bin/env: ‘python\r’: No such file or directory reinstalling poetry receives bash: /usr/bin/python: No such file or directory as i uninstalled python-is-python3, aliases and that would have removed the alternatives aliases edit:this was fixed via https://lifesaver.codes/answer/include-installation-instructions-for-python3-721 where this is suggested:
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python3
# or
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python however
edit againsource $HOME/.poetry/env python3 solves this, leaving this here for others as this was google top result for me |
Still present on Ubuntu 22.04
|
I still face it. Shouldn't be closed! |
|
Just remove virtual environment directory. If you enabled virtualenvs.in-project you need to remove '.venv' in your project directory. |
If you run on wsl, sometimes it may be caused by the difference line endings between windows and linux.
then try poetry agant. |
@dreamcoin1998 did you try using apt-get install python3
curl -sSL https://install.python-poetry.org | python3 - https://python-poetry.org/docs/master/ Wonder if that will fix it? On the website docs somehow the default view is not the latest docs, you have to change to "master" in the top. |
got this error on a MacBook using Anaconda. I solved it by installing toml first with conda:
After that poetry install worked with no error. |
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. |
-vvv
option).Issue
Attempting to run any poetry commands results in
In ubuntu 20.04 there is not "python" command, only "python3". If I install
sudo apt-get install python-is-python3
, then poetry starts to work again.It would be nice if poetry picked python3 if there is no python instead of failing. There is a python installed.
The text was updated successfully, but these errors were encountered: