Poetry: [1.0.0b4] poetry run fails with FileNotFoundError

Created on 11 Nov 2019  路  7Comments  路  Source: python-poetry/poetry

  • [x] I am on the latest Poetry version.
  • [x] I have searched the issues of this repo and believe that this is not a duplicate.
  • [x] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option). poetry run -vvv does not change anything about the output

  • OS version and name: Linux x86_64 (Elementary OS)

  • Poetry version: 1.0.0b4
  • Link of a Gist with the contents of your pyproject.toml file: Link (generated with poetry new)

Issue

Running poetry run without additional argument fails with

[FileNotFoundError]
[Errno 2] No such file or directory

Executing poetry run pip list for example works fine. It's just with either no argument or when the first argument is not found as an executable.

Bug

All 7 comments

Me also getting this error with the 1.0.0b4. Using double dashes is broken in the latest beta, e.g. poetry run -- pytest -svx --lf ends with the FileNotFoundError message.

I also getting this error after renaming the parent dir.
And it resolved by removing .venv dir and executing poetry install

I also getting this error after renaming the parent dir.
And it resolved by removing .venv dir and poetry install

Can you give a little bit more feedback on how did you resolve the issue? You removed the poetry install command from execution?

I'm sorry. I was mistaken.
I intended to say that I removed .venv dir, after that I executed poetry install and I resolved it

I just solved my problem. I used for reference this issue python-poetry/poetry#1198.
In my case, I have a project that uses a CLI interface implemented with click. So in order to run a command using poetry, first I had to register the group of commands as a poetry script, just like it's described here.
I hope it helps you!

Same problem here using 1.0.10 on Ubuntu 20.04.

poetry run --help

results in

[FileNotFoundError]
[Errno 2] No such file or directory

while poetry run python or poetry run pip works.

Related to #2741.

I have this issue too.

$ cat /etc/os-release

NAME="Ubuntu"
VERSION="16.04.6 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.6 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial

$ poetry --version

Poetry version 1.0.10

This doesn't work:

$ poetry run "echo hello"

Poetry version [OSError]
[Errno 2] No such file or directory

$ poetry run --help

Poetry version [OSError]
[Errno 2] No such file or directory

This works:

$ poetry run echo hello

hello

Was this page helpful?
0 / 5 - 0 ratings

Related issues

probablykasper picture probablykasper  路  3Comments

kierun picture kierun  路  3Comments

mozartilize picture mozartilize  路  3Comments

nikaro picture nikaro  路  3Comments

jbarlow83 picture jbarlow83  路  3Comments