Skip to content

Module not found in poetry using poetry run #9842

Closed Answered by SemPhares
SemPhares asked this question in General
Discussion options

You must be logged in to vote

The issue is likely due to Poetry managing virtual environments in a way that’s causing conflicts or making it difficult for your environment to access the installed dependencies.
Here’s the solution that worked:

1. Disable Poetry’s Virtual Environments:

Run the following command to prevent Poetry from creating virtual environments:

poetry config virtualenvs.create false

2. Remove Existing Virtual Environments:

If you’ve already installed dependencies in virtual environments, remove them by running:

poetry env remove --all

3. Reinstall Dependencies:

Finally, reinstall your dependencies without the virtual environment:

poetry install

After this, your dependencies should be available direct…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SemPhares
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant