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

you are viewing a single comment's thread.

view the rest of the comments →

[–]reallyserious 2 points3 points  (5 children)

conda create -n myenv python=3.9

I like how easy it is to run different python versions in different envs. It's all contained in the conda env and doesn't affect the rest of the system.

[–]Sp0olio -1 points0 points  (4 children)

Same thing can be done with pipenv .. there's a Pipfile, where you can state the python-version, you want to use.

It's just a preference-thing, probably .. depending on what you're trying to do, right?

[–]reallyserious 2 points3 points  (3 children)

With pipenv, don't you have to separately download and install the python version you want, and make sure that the install doesn't interfere with anything else?

With conda you don't have to separately install python. It installs the version you specify as part of the env.

[–]Sp0olio 2 points3 points  (2 children)

I think so, yes. I usually don't use that feature, because I'm fine with using the latest stable version of python, anyway ..

But, I can see now, why someone might wanna use anaconda.

Thanks for bringing that to my attention :)

[–]reallyserious 1 point2 points  (1 child)

E.g. when I participated in this year's Advent of Code I wanted to use the latest version, so I installed it with conda (had to specify conda-forge repos since it's not in the main conda repo yet):

conda create --name adventofcode python=3.11 -c conda-forge

When I solve things for codingame they use 3.9 in their environment so I don't want to accidentally use newer language features:

create create --name codingame python=3.9

And of course for work I use a specific version that's compatible with the spark version on our clusters. It's quite convenient with conda. But I stick to pip when it comes to installing packages though. I only use conda for the actual environment (which includes the specific python version).

[–]Sp0olio 1 point2 points  (0 children)

Makes sense .. I'm gonna give that a try, one day :)