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.

Poetry says that "environment seems to be broken" all the time

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: Fedora 32

  • Poetry version: 1.0.10

  • Link of a Gist with the contents of your pyproject.toml file: Link

  • I’ve also done poetry config virtualenvs.path .venv

Issue

Apparently, poetry invalidates virtual environment even if literally nothing happened to it. Here is an example where I install a package and and try to list packages, but it says that environment is broken and installs it again: Gist. My only idea is that PyCharm, which is configured to use the venv, messes something up but it shouldn’t write anything in venv, I guess.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
taranlu-houzzcommented, Aug 4, 2020

I think I am also running into the same issue.

I have a local poetry.toml:

[virtualenvs]
path = ".venv"

And virtualenvs.in-project is set to false globally.

1reaction
finswimmercommented, Aug 5, 2020

Ah, now I see what’s going on. At the moment you cannot point virtualenvs.path to .venv as this is some kind of reserved location for poetry. Whenever it finds a .venv folder within the project it asumes that this is the folder with the venv. But this is not the case here with this setting, because it just defines the root folder in which the folders for the venvs will be placed.

Related: https://github.com/python-poetry/poetry/issues/1770

fin swimmer

Read more comments on GitHub >

github_iconTop Results From Across the Web

The virtual environment found seems to be broken | python ...
Go to your project directory and start Poetry (if you're not already there); get rid of the broken virtual environment, · Leave Poetry...
Read more >
Python Virtual Environments tutorial using Virtualenv and Poetry
A mini-guided Python tutorial showing how to use virtual environment and why it's matters on virtualenv and poetry illustrated examples.
Read more >
Metaphor | Power Poetry
You say you're broken. That you're scattered and lost and falling apart. You lean all of your weight on me. Your limbs have...
Read more >
On Poetry as a Place to 'Reckon With Catastrophe' - KCET
An environmental journalist writes about the poems that help her process wildfire and climate change. At a time when so much is being...
Read more >
Decolonization & Environmental Panel / poetry – Ventana Media
We, the dammed… people? We have been cut off from the ocean of collective memory making the temporary occupation seem like eternity. Our ......
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