question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
apost71commented, Oct 30, 2020

That does sound accurate. Consider it changed.

0reactions
finswimmercommented, Oct 21, 2022

At the moment there are no plans to change this behavior, because it works as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Settings Reference for Python - Visual Studio Code
Python settings reference. The Python Extension for Visual Studio Code is highly configurable. This page describes the key settings you can work with....
Read more >
Graphviz's executables are not found (Python 3.4)
In my case, all I had to do to fix it is to put the environment path of the graphviz executables in my...
Read more >
Configure a Poetry environment | PyCharm Documentation
Poetry is a tool that facilitates creating a Python virtual environment based on the project dependencies. You can declare the libraries your project ......
Read more >
pre-commit
Run pre-commit install to install pre-commit into your git hooks. pre-commit will now run on every commit. Every time you clone a project...
Read more >
History | Poetry - Python dependency management and ...
Fix an issue where the output of commands executed with --dry-run contained ... Add recommendations about how to install Poetry in a CI...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found