Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

With plain venv it’s hard to maintain multiple different Python versions on the same machine; conda makes this much easier.

Also on M1/M2 Macs some libraries (especially for ML) are only available through conda-forge.



I have like seven pythons on my machine, and I use virtualenv all over, there's no issue, what's the issue? I have to type the path of a specific interpreter when i make a virtualenv, is that the problem? I bet that's the problem


> With plain venv it’s hard to maintain multiple different Python versions on the same machine

Ironically, given the usual software dev experience on Windows vs. Unixy systems, this is not a problem with the standard install on Windows with the py launcher.


It's not ironic at all; traditional Linux package management is actualy really bad. On a Linux system you can basically only have one version of anything installed at the same time.


I have multiple Python versions on both my Macbook M1 and my Linux laptop, with several dozen venvs. I honestly don't see why others are having so many issues.

Probably bad documentation/tutorials.


Presumably they're not managed by your system package manager? Or you have one of the rare and relatively new distributions (certainly not typical Linux) that can handle that smoothly, like NixOS?


Quite typical: Linux Mint, managed by apt with a third party repository [1].

On Mac I simply use the official installers from python.org.

[1] https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa


Is it? I just install different version with brew, and choose which python3.X to create a venv with. The ML packages issue is much more of an issue, but now that the ARM transition is well underway more and more packages work via normal pip.


pyenv and asdf both let you manage multiple versions of python on a single machine. They're not great but I wouldn't want to try without one of them.


> With plain venv it’s hard to maintain multiple different Python versions on the same machine;

plain venv never advertised itself as a solution to this problem... I don't like this tool, but, sorry to say so, you are barking on the wrong tree.

Also, it's not hard to maintain different versions of Python on the same machine without conda. I can literally do this with my eyes closed w/o touching the mouse: it boils down to:

    cd ~/src/cpython
    git checkout 3.8
    git fetch --all
    git reset --hard origin/3.8
    git clean -Xdf
    ./configure --with-ensurepip=install --with-system-ffi=yes
    make
    sudo make altinstall
Sorry. I've done this from memory and I kept one eye open. So, I kinda lied. But not really.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: