Support multiple python versions for in-project virtual environment management
See original GitHub issueThe current scenario when virtualenvs.in-project = true
is specified, is that we default to creating .venv
as the virtual environment. This needs to be improved to support multiple versions of python.
Ideally we will end up having a structure similar to the one below.
.
└── .venv
├── 3.7
├── 3.8
└── 3.9
Concensus Required
- Directory structure and naming.
- Should we default to this behaviour or make it opt-in only?
- If we want to default to this behaviour, should we start by opt-in first, and then opt-out?
- How should existing environments be handled? We can detect this and set project level config.
Tasks
- Drive concensus, approved by members of @python-poetry/core
- Implement new structure
- Implement test cases that validate new environment creation(s), gracefull handling of existing environments, compatibility with existing
env
sub-commands.
Related issues: #2908
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How to manage multiple Python versions and virtual ...
If you are using a single version of Python say version 3.3+, and want to manage different virtual environments, then venv is all...
Read more >Python Environment management - Dev Genius
Your application needs to support multiple Python versions; Your want your virtual environment associated with your Python project and ...
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 Tools for Managing Virtual Environments
If you want to use virtualenv to manage virtual environments and also handle multiple Python versions, pyenv-virtualenv may suit you.
Read more >Python Project Setup – Virtual Environments and Package ...
Virtual environments are helpful if you develop multiple Python ... environments; which tools help with package management in Python ...
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
For sure @artorias111. We always appreciate contribution.
But we need to first come to a consensus on how it should look like, as @abn described in his post.
fin swimmer
I don’t know if it’s on purpose, but I use this command
export POETRY_VIRTUALENVS_PATH="$PWD/.venvs"
, and what @abn is proposing happens naturally