Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?= Newsgroups: comp.lang.python Subject: Re: Best practise for managing Conda environments? Date: 22 Sep 2026 19:53:20 GMT Organization: @ Home Lines: 47 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit X-Trace: individual.net xw50VKm32jhAPPtEMBcM8g7mQrB5ixWmSGDgf5DSFbVLhyqlhc Cancel-Lock: sha1:IXUPEwNp/lEHW2rRf1t///7j428= sha256:q/yY8doDt/+FiAFBTkRPZYfOrqJSuL0D50S5XMcDOS4= User-Agent: slrn/1.0.3 (Linux) Xref: csiph.com comp.lang.python:198052 Den 2026-09-21 skrev Martin Schöön : > Yesterday, however, I encountered a problem that a quick internet > search told me is somewhat common: adding a package to an environment > stalls at the 'solving environment' stage. I found a bunch of rather > different 'fixes'. I have not tried any yet. I think maybe I am doing > environments wrong. > > Among the 'fixes' suggested are: > > * Use mamba for installing packages. > * conda config --set channel_priority strict > * Remove and re-create environments to ensure packages are up-to-date. > > My thinking now: > > I should have more rather than fewer environments and make them more > task specific -- avoid 'general purpose' environments to limit the > number of packages in each environment. OK guys and gals, I have done some research and think I have answers. Yes, I have indeed done environments wrong! The following three are the most concise ones when it comes to advice: https://nsc.gitlab-pages.liu.se/berzelius-training/managing-conda-environments-best-practices/1.%20concepts/ https://nsc.gitlab-pages.liu.se/berzelius-training/managing-conda-environments-best-practices/2.%20best-practices/ https://msi.umn.edu/getting-started/help/knowledge-base/best-practices-conda These are also good: https://techietory.com/managing-python-environments-with-conda/ https://www.whiteboxml.com/blog/the-definitive-guide-to-python-virtual-environments-with-conda https://thejacksonlaboratory.github.io/bestpractices_workshop/conda.html TLDR: * Create task specific environments. * Use mamba. * Try, as far as possible, to instal all needed packages in one go. * Don't mend/tinker with environments. Create new ones instead. * Document your environments. README.md or something... I also asked Duck.ai (front end for Mistral Small 4 in my case) for advise. The results looks like a summary of the information I linked to. I will post it separately after having read through and figured out how to format it for usenet news. /Martin