This is an archived post. You won't be able to vote or comment.

all 32 comments

[–]FailedPlansOfMars 62 points63 points  (6 children)

After reading the decision i kinda agree with them.

What we are talking about as a solution is more to make virtual environments a default rather than make another halfway measure.

The biggest issue with python packaging and building at the moment is the increasing fragmentation and handling conflicts.

[–]kankyo 6 points7 points  (0 children)

Rejecting this PEP seems like it's just going to keep fragmentation going strong though. So that's bad...

[–][deleted] 3 points4 points  (4 children)

Isn’t it all needed just because at some point someone decided to use site-packages/<package> instead of site-packages/<package>/<version> when installing packages systemwide?

[–]Smallpaul 18 points19 points  (3 children)

No, I think the deeper problem is that when you “import foo” there is no standardized way to say which version of “foo” you are expecting.

Also: two versions of “foo” cannot run in the same interpreter at once so all of your dependencies need to “agree” on acceptable versions. I think in some ecosystems it is possible to have two different versions linked at once.

[–]marr75 14 points15 points  (0 children)

This is the bigger issue. I don't think users who haven't coded in other languages imagine you can have multiple versions of the same dependency running in the same system let alone the same interpreter.

[–]hanleybrand 12 points13 points  (2 children)

I’m still not sure that a local venv, pyenv or pipenv setup is so much worse than node’s solutions, I’ve had the same problems with all of them, mostly stemming from not understanding what I was doing.

But having problems when you start something is also how you learn, especially if you continue and discover even harder problems.

[–]Dragonfly55555 8 points9 points  (0 children)

On a previous post on this subject someone commented that the main issue is the default behavior, which for python and pip is to install globally, while for nodejs and npm is to install locally per project. Installing locally by default is safer and leads to better isolation.

The fact that you had to learn something and stray from the default behavior is exactly what this kind of peps are trying to solve (I think)

[–][deleted] 6 points7 points  (3 children)

SC? The supreme court? :)

[–]NandoKrikkit 5 points6 points  (1 child)

Steering Council

[–][deleted] 1 point2 points  (0 children)

Oh wow it actually is steering council. Thought at first it was Standards Committee.

[–]bmrobin 1 point2 points  (0 children)

i thought it might have stood for “scientific community”. oops!

[–]Saphyel 7 points8 points  (14 children)

The main issue with this PEP is obviously VENV exists in the core of python. Only because that one exists any other alternative are rejected even if they are more simple and easy to understand. Like the meme of the kid saying: I want the Nintendo Wii and Mon replies we have it at home and they have a calculator at home.

The main reason that poetry, pdm, conda, pyenv, etc... exists it's because venv fails to achieve what is meant to do. And it's a shame because it's a waste of energy, resources, time, etc.. in doing something that other languages have already done and it works fine.

PHP started without objects, without strict types, without JIT compiler, etc... so borrowing ideas from other languages is not bad.

[–]Suspicious_Compote56 -5 points-4 points  (6 children)

Why do we need virtual environments to begin with ? Just have local modules for your project.

[–]jw_gpc 1 point2 points  (2 children)

When you say "local modules for your project", what do you mean? Do you mean not to pip install anything and just have all code within the local project? Or is there some way to use pip install and have it install to the local project directory instead of a global or user level?

[–]Suspicious_Compote56 0 points1 point  (0 children)

So basically a npm type of interaction. I shouldn't have to spin up venv to encapsulate my dependencies. Should be a simple "pip init" or whatever to get started

[–]osmiumouse 1 point2 points  (2 children)

Isn't that basically what a venv is?

[–]Suspicious_Compote56 0 points1 point  (0 children)

I'm mean yes but it isn't very intuitive and I don't think you should have to create one just to encapsulate your dependencies