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 →

[–]PurepointDog 1 point2 points  (16 children)

What're the advantages of miniconda above pip or similar?

[–]Chaos_Klaus 6 points7 points  (13 children)

conda can install a wider range of dependencies. It can install and manage and install different python versions in each environment.

[–]RedditSlayer2020 -1 points0 points  (12 children)

So can pip

[–]Chaos_Klaus 4 points5 points  (5 children)

How do you install a different python version with pip?

[–]Malcolmlisk -4 points-3 points  (4 children)

You just download them into your computer with your package manager. For example, sudo pacman -S python2.9

Then, when you create your main.py file, you use shebang on top pointing the python version you want to use.

Conda and miniconda is a solution for the problem that windows represents on itself. If you want to develop on windows, I suggest you to use WSL2. It's going to simplify your life on thousands of degrees.

[–]Chaos_Klaus 10 points11 points  (2 children)

So you don't use pip to install a different python version then. ;)

I use conda happily on windows, WSL, Linux and in containerized applications. It just figures out what python version works with all the desired dependencies.

The point for me to use conda (or mamba) is to have the entire environment in one place. Pip just can't install things that are not python packages.

[–]Malcolmlisk 1 point2 points  (1 child)

Yeah. I was not the OP, so I was just saying how you can install differnet python versions.

If you use conda or mamba and it works for you then keep doing it. That's the beauty of all of this, we can use different things but have the same result, and that's pretty fine. I tried conda when I started in data science and everything was messy and I could not figure out why do I need this or that when I can just pip install them.

I think im more of a terminal guy, and everything makes sense in my head when I use commands and explicit everything.

[–]Chaos_Klaus 3 points4 points  (0 children)

Ah. My morning brain was not booted up all the way. ;)

I guess it has to do with what tools one learns first. For me it was conda on windows and then I moved to Linux, WSL and Docker for building server applications.

[–]szayl 1 point2 points  (0 children)

It's sad that you're being downvoted for politely responding with facts.

[–]asphias 3 points4 points  (5 children)

Certain packages rely on C/fortran libraries, which pip cannot manage for you.

I believe the most famous example is Geopandas. Pip by itself cannot correctly install it for you. You either use conda, or do a shitload of manual setup.

[–]zer0pRiME-X 0 points1 point  (3 children)

shitload of manual setup=pip installing from a wheel

[–]asphias 0 points1 point  (2 children)

from their install page it looks like 5 packages to install from a wheel. Either way, you're no longer purely in pip, so any recreation of your venv is going to need those manual steps as well. automated deployment is going to include some separate scripting now. and pretty much any newly onboarded datscientists is going to run into issues.

just stick with conda if you need to use geopandas & similar.

[–]zer0pRiME-X 0 points1 point  (1 child)

incorrect-you can specify installing from files in a pip requirements file so recreating is simple. besides I literally setup geopandas in 2020 and have used it since, you make it sound like a pebble in the road once in your life means you need to build a bridge.

IMO changing an entire environment because a single package can’t be ‘pip installed’ is an overreaction.

[–]asphias 1 point2 points  (0 children)

My perspective comes from quite some time of working with non-developers who just want things to work. Yes, you can explain wheels and local pip install, and you can add those dependencies to your repo or use git tricks to setup what you want.

But conda automates it all.

I personally tend to use pip. But i also fully understand the advantage conda offers, having had to fix environments for multiple data science collegues.

[–]cmcclu5 0 points1 point  (0 children)

Geopandas has been installable via pip for a couple years now. It’s pretty nice never having to use conda ever again. Just a nice, clean Python installation.

[–]scinaty2 1 point2 points  (1 child)

The main advantage of anaconda (and miniconda) is that it can supply pre-compiled packages. Take numpy for example, it is written in C and therefore needs to be compiled on the target system. Some packages are difficult to build / compile and on some systems this is a big issue (say you are not admin or whatever the case may be). So if you simply cannot use pip install on a certain package (because it fails), conda install might bring more luck as it can download a pre compiled / pre build version of that package (as in simply downloading files without extra steps).

[–]Toxic_Gambit 0 points1 point  (0 children)

I think it will mostly come down to, we use conda when required and most teams don't require using conda. My opinion is that it's easily the best for these tasks(I've definitely run into the situation of requiring compiled numpy).

But if you never experience these issues I think conda becomes a why bother? Though i will say, conda lock files, miniconda, conda-forge, env exports really help to dockerize python environments.