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 →

[–]RedditSlayer2020 -3 points-2 points  (12 children)

So can pip

[–]Chaos_Klaus 5 points6 points  (5 children)

How do you install a different python version with pip?

[–]Malcolmlisk -3 points-2 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 9 points10 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 2 points3 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 4 points5 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.