Getting FileNotFound error running almost anything with "poetry run"
See original GitHub issue-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option). -
OS version and name: Alpine linux 3.11.5 under Docker (on Windows)
-
Poetry version: 1.0.5
-
Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/dragonpaw/c9e5fd0f920690e0a0274bb3e87f94f1
Issue
I’m kinda stumped what’s up with running black, or anything else, via poetry run
while within my Docker container. When running locally, everything seems fine.
This happens:
/app $ poetry run black
[FileNotFoundError]
[Errno 2] No such file or directory
Adding -vvv
doesn’t seem to help: (Though I’m not sure where the -vvv
should go)
/app $ poetry run -vvv black
[FileNotFoundError]
[Errno 2] No such file or directory
/app $ poetry -vvv run black
USAGE
poetry help [<command1>] ... [<commandN>]
ARGUMENTS
<command> The command name
GLOBAL OPTIONS
-h (--help) Display this help message
-q (--quiet) Do not output any message
-v (--verbose) Increase the verbosity of messages: "-v" for normal output, "-vv" for more
verbose output and "-vvv" for debug
-V (--version) Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n (--no-interaction) Do not ask any interactive question
In fact, it doesn’t care if I give it a command:
/app $ poetry run -vvv
[FileNotFoundError]
[Errno 2] No such file or directory
Black is definitely on the path…
/app $ which black
/usr/local/bin/black
But if I give the full path, then it works:
/app $ poetry run /usr/local/bin/black
No Path provided. Nothing to do 😴
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Can you verify it is installed by running poetry install? If nothing happens try to delete the virtual env and rerun install. I might have had a similar case where I think the reinstall helped
I believe I’m also running into this issue on version 1.1.13, but I am trying poetry for the first time.
It seems important to know that
~/go/bin
just happens to be the last entry in myPATH
.Update: I’m not sure what matters here but I reshimmed asdf (
asdf reshim
) then ranpoetry install
and things seem to be working now.