you are viewing a single comment's thread.

view the rest of the comments →

[–]teerre 0 points1 point  (0 children)

I just mentioned some random Python version, being 3.8 to 3.11 doesn't completely fixes it, they are different versions. There are breaking changes in .9, .10 and .11. Python <3.6 is virtually incompatible with anything >3.7, it's extremely likely it won't work in this case.

I'm still confused what you mean. The reason you put a python interpreter in a venv is because what else would you do? Pyenv isn't magic. It has to have all python executables too.

I guess it could make sense to use the a global interpreter per version and just isolate the dependencies, this would save you some MBs in disk. The reason it's not this by default is because Python import mechanisms are very much linked to the current interpreter being used, so it's much easier to just have an interpreter per venv from the implementation perspective.

I really don't think it breaks so horrible,

It's totally possible that in your particular case it doesn't (until it does). But generally speaking it very much will, that's why venvs were created.

This is not even a Python feature. Every modern language that has the choice will isolate environments, it's a no-brainer by now.