The 'poetry run' command should not execute binaries installed outside of the environment
See original GitHub issue- [ 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).
- OS version and name: Mac OS Catalina 10.15.7
- Poetry version: 1.1.3
- Link of a Gist with the contents of your pyproject.toml file: I’m not including this because I dont think it is useful for this report.
Issue
I am not positive this constitutes as a bug but I wanted to raise it anyways. I am using FastAPI and Uvicorn to run a web application and I have uvicorn installed on my global system python. When I was messing with my dependencies, I inadvertently removed a dependency that pulled Uvicorn into my poetry environment (It was a dependency of a dependency). When I was trying to run my service using poetry run uvicorn service:app
, there was no error but Uvicorn raised an error saying that it could not find my dependencies in its path. After investigation, when poetry did not find uvicorn in its environment, it ended up using the uvicorn instance that was installed on my global system. This problem was easily resolved by adding uvicorn into my pyproject.toml
file. However, I believe poetry should have thrown an error if it did not find the necessary requirements in its environment.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
That does sound accurate. Consider it changed.
At the moment there are no plans to change this behavior, because it works as expected.