python – Trouble importing environment anaconda

  1. make yourself familiar with conda on the commandline. To import an environment that was before exported into a .yaml file, use
conda env create --file my-env.yml

If your conda isn’t in your path, you can use the Anaconda-Navigator to start a terminal with the base environment active by using the green button marked in the image in the Environments / base section of Anaconda-Navigator. There you can use the command.

enter image description here

You will see in more detail what is happening on the commandline.

  1. Conda can get awfully slow with resolving conflicts in larger environments. The Mamba solver, written in c++ (instead of python like the original Conda) is much faster and that may help a lot in cases like this. Even the mamba solver may take his time, but i have seen Conda taking hours to finish.

  2. The Mamba solver is the solver from the mamba project, which is a drop-in replacement of Conda written in c++, and therefore much faster than the original Conda. So, i recommend using Mamba over the original Conda. It is much faster than Conda. You can install it into an existing Conda-installation, and although it is not the recomanded way, it might be much easier to do so if there is an existing Conda installation that you like to keep. The recommended Way is to use the Mambaforge installer or the micromamba executable.

  3. If you actually decide to ditch the Anaconda-installation and start with a fresh Mamabforge-installation, but still like to have the comfort of the Anaconda-Navigator, you can install the Anaconda-Navigator alongside of Mamba, but don’t clutter your base env with it. Instead, install Anaconda-Navigator into it’s own environment using

mamba create -n anaconda-navigator anaconda-navigator -c anaconda

This will install Anaconda-Navigator into its own Environment (as Anaconda-distribution itself should have done, but sadly didn’t). Fun part: You will see the Anaconda-Navigator environment when listed on the Commandline with

conda env list

but not inside the Anaconda-Navigator, it’s hiding itself.

Read more here: Source link