News for hackers. Stuff that matters.
Re:Python Best Practices for a New Project in 2021 by kuu on Monday July 05, 2021 @07:24AM (#27736769)
I'm a bit surprised that conda is not mentioned anywhere (I'm not saying as best practice, but as an alternative or why envs are better)
Re:Python Best Practices for a New Project in 2021 by matsemann on Monday July 05, 2021 @09:12AM (#27737606)
Conda is one of the most annoying things with Python imo. Or, it's just another symptom of the crazy dependency hell of python, but it's actively making it worse. Now every project is a mashup of conda and pip and probably more.

Just right now I'm trying to fire up a new instance on GCP. With a completely clean image, doing a conda install hangs for 30 minutes while it's trying to "solve" something.

Re:Python Best Practices for a New Project in 2021 by KaiserPro on Monday July 05, 2021 @09:44AM (#27737908)
Conda is a ginormous pain in the arse.

I supported a research cluster, and the amount of times conda caused an issue was a lot.

Re:Python Best Practices for a New Project in 2021 by karxxm on Monday July 05, 2021 @07:26AM (#27736783)
Yup, especially when you are working with os-level dependencies like cuda, conda is the way to go. I think every tensorflow user can approve
Re:Python Best Practices for a New Project in 2021 by dijksterhuis on Monday July 05, 2021 @08:58AM (#27737467)
Quite confused about this comment as many of the latest tensorflow V2 releases aren't reliably uploaded to conda forge. IIRC there's only like 4 or so of the V2 releases uploaded.

You can conda install the CUDA dependencies and then install the required Tensorflow version via conda pip. But that's not much different to installing CUDA manually and then installing tf from system pip.

It's much faster and easier to pull a tf Docker image as it's their "officially supported" way to get up and running.

So... as a tf user and a sysadmin... Nah. No conda for me thanks.

Re:Python Best Practices for a New Project in 2021 by karxxm on Monday July 05, 2021 @09:06AM (#27737541)
One project uses tf 2.1, one uses 1.15 and the other 2.4 ... for me it is much more convenient to have 3 envs rather than 3 containers or switching the system cuda as needed... I especially had problems debugging through docker containers back in the days, therefore i never picked it up again.
Re:Python Best Practices for a New Project in 2021 by codethief on Monday July 05, 2021 @07:44AM (#27736921)
…unless you're working on a project for arm64-based IoT devices (like Nvidia Jetson), where Conda is not available.
Re:Python Best Practices for a New Project in 2021 by hantusk on Monday July 05, 2021 @07:51AM (#27736979)
Does it not work with miniforge/mambaforge? (https://github.com/conda-forge/miniforge)

I use this with my m1 mac, and it works great.

Re:Python Best Practices for a New Project in 2021 by wdroz on Monday July 05, 2021 @07:52AM (#27736981)
Re:Python Best Practices for a New Project in 2021 by codethief on Monday July 05, 2021 @10:20AM (#27738271)
Awww man. I must have missed that announcement by only a few days.
Re:Python Best Practices for a New Project in 2021 by laminatedsmore on Monday July 05, 2021 @08:11AM (#27737119)
Conda has been a lifesaver for me in the past, but it got so slow in ~2019 (minutes+ to resolve dependencies) that I've switched back to pip whenever possible. Maybe things have been resolved now though?

E.g. https://github.com/conda/conda/issues/8087, https://www.anaconda.com/blog/understanding-and-improving-co...

Re:Python Best Practices for a New Project in 2021 by sseagull on Monday July 05, 2021 @08:41AM (#27737361)
I have an environment (somewhat complicated but not that bad really) that occasionally takes more than an hour.

Oh and if there is a conflict somewhere, it goes into some conflict detection routine that will take hours and not produce anything useful.

I could go on, but I have come to really dislike conda.

Re:Python Best Practices for a New Project in 2021 by lr1970 on Monday July 05, 2021 @08:51AM (#27737429)
> Conda has been a lifesaver for me in the past, but it got so slow in ~2019

This is why mamba [0] was created. It is a C++ reimplementation of conda for much better performance. mamba is a drop-in replacement of conda and can operate on the same anaconda, condaforge (and mambaforge) repositories.

[0] https://github.com/mamba-org/mamba

Re:Python Best Practices for a New Project in 2021 by sseagull on Monday July 05, 2021 @09:56AM (#27738024)
I do have to try mamba sometime but I feel like there is something more than python slowness going on.

I use Gentoo and its package manager is written in python. Even though it is more complex (IMO) it doesn’t have nearly the same slowness when it comes to dependency resolution and conflict detection.

Re:Python Best Practices for a New Project in 2021 by gillesjacobs on Monday July 05, 2021 @08:26AM (#27737249)
My only problem with conda is the proliferation of package sources and lack of dev support.
Re:Python Best Practices for a New Project in 2021 by pmkiwi on Tuesday July 06, 2021 @07:03PM (#27755465)
conda makes sense in some circumstances but you need to invest a lot of times to undersand this tool (remind me my Maven times sometimes...).

With all scientist packages, conda is pretty good but it is sooooo slow, it is just insane!

Re:Python Best Practices for a New Project in 2021 by wdroz on Monday July 05, 2021 @07:29AM (#27736805)
Yes, if you are doing anything close to machine learning, conda is the most favored tool.
Re:Python Best Practices for a New Project in 2021 by rwmark on Monday July 05, 2021 @07:54AM (#27736996)
conda is developed by heretics and not the ideologically sound country club.
Re:Python Best Practices for a New Project in 2021 by u678u on Monday July 05, 2021 @09:24AM (#27737728)
conda was necessarily 5 years ago but now pip seems a lot more reliable so I've given up using it.
Re:Python Best Practices for a New Project in 2021 by zo1 on Monday July 05, 2021 @10:18AM (#27738250)
Yeah, now all the "hip" devs are driving things towards "poetry".

It's very disillusioning to see how sheer twitter-followings and "popularity" type metrics drive development these days by forcing alternatives to be de-facto neglected. Everyone does what's "hot", so all the tutorials and bug reports and tests and SO questions and new libraries and and and all go towards that framework or language or tool or method. You can't even argue technical merits towards the neglected options because yes the popular tool is better, but only because we have a metric boat load (millions) of man-hours being pumped into making it better instead of all the alternatives. It's like the tech-equivalent of fashion fads in that it's self-reinforcing. Not to take away from some of the actual and technical achievements that some of these things have made, of course.

Re:Python Best Practices for a New Project in 2021 by jonnycomputer on Monday July 05, 2021 @12:14PM (#27739420)
I guess. But frankly, all the solutions were than not that great. So its not surprising people might want to move to something new.
Re:Python Best Practices for a New Project in 2021 by u678u on Monday July 05, 2021 @11:49AM (#27739131)
You should see our k8s migration, its the biggest waste of time for everyone I've ever seen.