Module versions in Python

That might be something you could reach out to anaconda through their support channels.

Otherwise, on windows, I’d recommend:

  • stay within the conda ecosystem
    • but don’t use anaconda
      • and in fact uninstall it, and remove any modifications it made your machine, such as environment variables
  • start with a clean mambaforge
    • this is made of all conda-forge packages, and makes conda-forge your default channel
    • put it in a humorously short path, e.g. C:\mf
      • but actually read all the options
        • don’t apply any shell modifications
          • e.g. add to path, register as python
  • use the provided “prompt” desktop shortcut to start it
    • windows terminal (from the windows store) with cmd.bat is highly recommended
  • in that base env, only ever install/keep up-to-date mamba
    • and its dependencies (e.g. python)
  • for each other project you work on (or class, or client, or whatever)
    • make (and check in to version control) an environment.yml that describes the “leaf” dependencies,
    • e.g.
      • python >=3.11,<3.12
      • pandas >=1.5.2,<2
      • jupyterlab >=3.5.2,<4
    • create those environments with mamba env update -n project-1 --file environment.yml
      • indeeed, only ever use mamba env update, and add new dependencies there
        • package-by-package installation is much slower, and more likely to get stuck in strange local minima vs solving the whole env
    • activate them when using them
      • you can make more Windows Terminal shortcuts

With this setup:

  • it’s far less likely to end up in a place where you can’t update mamba itself
    • and it can do that more quickly than conda
  • your individual environments are separate, and can be individually updated without the risk of breaking everything
  • you
2 Likes