4 ms·
Most other languages have moved that sort of information into more shared container formats like Docker (and higher level container orchestrators like Kubernete
by WorldMaker 8y ago
Most other languages have moved that sort of information into more shared container formats like Docker (and higher level container orchestrators like Kubernetes, etc). virtualenv has been a relatively poor, Python-specific Docker, and it is probably past time for the benefit of Python DevOps to retire virtualenv entirely for more general/shareable tools.
- devxpy 8y agoI actually kinda liked having a virtualenv. Although the hacks used to make it work, were not nice. I would have loved to see core python suppport for virtualenv, which could probably avoid these hacks.
- BerislavLopac 8y ago"Core support" in which sense exactly? It is part of the standard library: https://docs.python.org/3.7/library/venv.html https://docs.python.org/3.7/library/venv.html
- sfoley 8y agoVirtualenv is not the same thing as venv, but you are correct that package isolation is now part of “core python” - as of 3.3.
- BerislavLopac 8y agoYes, but apart from virtualenv being older and working with Python 2, I fail to see the difference between the two.
- devxpy 8y agoI could be wrong, but virtualenv, like pip, is not part of the core language. Its developed exclusively by pypa. https://github.com/pypa/virtualenv https://github.com/pypa/virtualenv
- BerislavLopac 8y agoVirtualenv and Docker have two very different purposes: the former basically sets the environment variables to isolate Python runtime environment from the rest of the filesystem, while the latter isolates OS processes. No "languages have moved [...] into [...] Docker" -- it's just that you can isolate your running process using Docker, so any platform that runs a process (hint: all of them) can use Docker. Python virtualenvs have the primary purpose to isolate Python environment during development, and Docker is not the right fit for that purpose: one container basically isolates a single process, and when developing you want to be able to run a number of different processes at will: tests, code with or without debug etc. With docker, you either need a container for each process, or you can parametrise a single one, and each of those solutions adds unnecessary complexity.