PackageNotInstalledError: Package is not installed in prefix

use

conda create -f environment.yml

After creating a new environment, you can see all the installation packages by using CONDA list in the new environment, but you will report an error when opening Python import

according to

https://stackoverflow.com/questions/51712693/packagenotinstallederror-package-is-not-installed-in-prefix

I tried the suggestions in it

conda update --name base conda

Invalid, no attempt

conda update --all

Because all installed packages will be upgraded

Then try

conda install anaconda

A lot of new bags, but still invalid, finally

conda activate base
conda update --all

solve the problem

Read More: