Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make venv follow links to a specific python version #2808

Open
EdwinBennink opened this issue Nov 26, 2024 · 0 comments
Open

Make venv follow links to a specific python version #2808

EdwinBennink opened this issue Nov 26, 2024 · 0 comments

Comments

@EdwinBennink
Copy link

What's the problem this feature will solve?

When a venv is created using e.g. python3 -m venv myvenv, it will create the link myvenv/bin/python3 -> /usr/bin/python3 instead of myvenv/bin/python3.10 -> /usr/bin/python3.10.
When a new python version is installed, /usr/bin/python3 will (likely) link to the new version and so will the venv. This is not the desired behavior.

Describe the solution you'd like

Make venv follow links when creating the venv. The links in the bin dir should point to a specific version, e.g. myvenv/bin/python3.10 -> /usr/bin/python3.10, no matter if python was called using /usr/bin/python , /usr/bin/python3 or /usr/bin/python3.10 .

This enables installing other python versions without breaking existing virtual environments.

An alternative is to make users aware of the way this works and that they should be specific when creating the venv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant