poetry env remove with virtualenvs.in-project = true
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: 18.04.3 LTS (Bionic Beaver)
-
Poetry version: Poetry version 1.0.5
-
Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/fgervais/5a33d9df4cca064f02ce7fa6136c7e5e
Issue
I think poetry env remove
fails when virtualenvs.in-project = true
$ poetry env info
Virtualenv
Python: 3.6.9
Implementation: CPython
Path: /home/fgervais/personal/test/.venv
Valid: True
System
Platform: linux
OS: posix
Python: /usr
$ poetry config --list
cache-dir = "/home/fgervais/.cache/pypoetry"
virtualenvs.create = true
virtualenvs.in-project = true
virtualenvs.path = "{cache-dir}/virtualenvs" # /home/fgervais/.cache/pypoetry/virtualenvs
$ poetry env remove 3.6.9
[ValueError]
Environment "test-dT4kcP9T-py3.6" does not exist.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:26
- Comments:8
Top Results From Across the Web
I can't delete an poetry managed environment - Stack Overflow
The simplest way to delete poetry env is to try something like this. poetry env remove python3.10.
Read more >Managing environments | Documentation - Poetry
If you use a tool like pyenv to manage different Python versions, you can set the experimental virtualenvs.prefer-active-python option to true .
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 >Python poetry: Explanations and tips - Frank-Mich's Blog
Tip: Set virtualenvs.in-project to true ... Personally, I prefer to keep my virtual environment on hand. If I need to delete it for...
Read more >Poetry Advance - Python Biella Group
The secret formula for each poetry-based project is the establishment of a ... poetry and venv exit # remove venv with Poetry poetry...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Is this issue is still active? I found the same problem on macOS 11.6 Big Sur with Python 3.9 and poetry version 1.1.12:
Same issue (Ubuntu 22.04). Interestingly, if the only virtual environment you have is a local
.venv
in your project, this works fine: