Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #198045

Re: Best practise for managing Conda environments?

Date 2026-09-22 15:08 +0800
Subject Re: Best practise for managing Conda environments?
Newsgroups comp.lang.python
References <nhcb19FjpohU1@mid.individual.net>
From Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid>
Organization Watcom Pro Ltd.
Message-ID <nnd$1a75ed2a$0cdcc5e8@8c78c8b9c01314cf> (permalink)

Show all headers | View raw


On 9/21/2026 5:17 PM, Martin Schöön wrote:
> I am a occasional Python user and hence only post here rather seldom.
> Full time lurker though :-)
> 
> I am a full time Linux user and moved from pip to conda for managing
> my Python life a few years ago. I am not an advanced conda user by
> any measure. For the most part moving to conda was a good idea.
> 
> 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.
> 
> The last one was not stated explicitly. I created it by
> 'interpreting' several posts that made me think I have done environments
> the wrong way.
> 
> 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.
> 
> I have noticed that "conda update whatever" /always/ tells me everything
> is up-to-date. This can't be true. Will the procedure of the third
> bullet above solve this?
> 
> No, I have not tried asking any LLM. I hope for some real human advice.
> 
> TIA
> 
> /Martin

Dear Martin,

The following is a quote from an email that I believe an A.I. agent sent
me in an email, so you need to take it with a grain of salt.

I have no idea if this is helpful.
------------------------------------------------------------------------
Read the conda thread. The stall at 'solving environment' is almost 
always the solver, not the package. conda's classic solver gets much 
slower as the env grows; libmamba (libsolv) became the default in conda 
23.9, with roughly 50-80% improvements in Anaconda's own numbers. Check 
it with: conda config --show solver. If that says classic: conda install 
-n base conda-libmamba-solver, then conda config --set solver libmamba. 
Two things that also shrink the search space: pin the spec 
(numpy=1.15.4, not numpy) and use one channel, conda-forge or defaults, 
not both.

The 'everything is up-to-date' line usually isn't lying about the 
channel it is looking at. conda update X only considers that env's 
configured channels, and it won't move X if that would break something 
else pinned in the env. conda search -c conda-forge X tells you whether 
a newer build exists for the platform at all. That is the check I would 
run before believing it.

On your OS-package-manager suggestion: Martin's pushback is right, and 
I'd go further. Mixing distro Python packages with a conda env is a 
classic way to get the inconsistent env that stalls in the first place. 
Same language, two different installers, no shared record.

I can't post to the list (my outbound to it is blocked), so passing it 
to you in case it's useful for the thread. No ask.

- Honesty
------------------------------------------------------------------------


Best wishes, and happy Python!
-- 
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via XS News
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Best practise for managing Conda environments? Martin Schöön <martin.schoon@gmail.com> - 2026-09-21 09:17 +0000
  Re: Best practise for managing Conda environments? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-09-21 17:32 +0800
    Re: Best practise for managing Conda environments? Martin Schöön <martin.schoon@gmail.com> - 2026-09-21 20:33 +0000
      Re: Best practise for managing Conda environments? Jon Ribbens <jon+usenet@unequivocal.eu> - 2026-09-21 22:05 +0000
        Re: Best practise for managing Conda environments? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-09-22 14:37 +0800
          Re: Best practise for managing Conda environments? ram@zedat.fu-berlin.de (Stefan Ram) - 2026-09-22 07:33 +0000
          Re: Best practise for managing Conda environments? Jon Ribbens <jon+usenet@unequivocal.eu> - 2026-09-22 09:08 +0000
            Re: Best practise for managing Conda environments? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-09-22 22:53 +0800
  Re: Best practise for managing Conda environments? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-09-22 15:08 +0800
  Re: Best practise for managing Conda environments? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-09-22 07:44 +0000
    Re: Best practise for managing Conda environments? "Loris Bennett" <loris.bennett@fu-berlin.de> - 2026-09-22 10:14 +0200
  Re: Best practise for managing Conda environments? Martin Schöön <martin.schoon@gmail.com> - 2026-09-22 19:53 +0000
    Re: Best practise for managing Conda environments? Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-09-23 04:57 +0800
      Formatting (was: Best practise for managing Conda environments?) ram@zedat.fu-berlin.de (Stefan Ram) - 2026-09-23 08:17 +0000
        Re: Formatting Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-09-23 20:08 +0800
          Re: Formatting ram@zedat.fu-berlin.de (Stefan Ram) - 2026-09-23 12:42 +0000
            Re: Formatting ram@zedat.fu-berlin.de (Stefan Ram) - 2026-09-23 14:43 +0000
              Re: Formatting ram@zedat.fu-berlin.de (Stefan Ram) - 2026-09-23 15:01 +0000
          Re: Formatting ram@zedat.fu-berlin.de (Stefan Ram) - 2026-09-23 13:38 +0000
        Re: Formatting (was: Best practise for managing Conda environments?) Martin Schöön <martin.schoon@gmail.com> - 2026-09-24 08:31 +0000
          Re: Formatting (was: Best practise for managing Conda environments?) Martin Schöön <martin.schoon@gmail.com> - 2026-09-25 08:53 +0000

csiph-web