Last updated: Apr 10, 2024
Reading time·4 min
The Anaconda error "The environment is inconsistent, please check the package plan carefully" occurs when you have inconsistent packages in your Conda environment.
Issue the conda install anaconda
command to resolve the error.
Here is the complete stack trace.
The environment is inconsistent, please check the package plan carefully The following packages are causing the inconsistency: - defaults/win-64::absl-py - defaults/win-64::alabaster== - defaults/win-64::anaconda-client== - defaults/win-32::anaconda== ... done
The first thing you should try is to run the conda install anaconda
command.
conda install anaconda
y
and press Enter
.The conda install anaconda
command:
anaconda
package.Note that it might take a couple of minutes for Anaconda to figure out which packages it has to install, remove and update.
If the issue persists, try to run the conda update --all
command.
conda update --all
The command updates all packages in the environment so any version clashes should be resolved.
If the error persists, it is most likely caused by the packages listed in the error message.
Something that often helps to resolve the inconsistency is to run the
conda install <package_name>
command for each package from the error message.
conda install requests
Make sure to replace requests
with one of the names of the packages from your
error message.
Try to issue the command separately for each package.
For example, if your error message looks as follows.
- defaults/win-64::absl-py - defaults/win-64::requests== - defaults/win-64::scipy==
You would issue the following commands.
conda install absl-py conda install requests conda install scipy
If the issue persists, run the conda update --all
command after installing the
packages from the error message.
conda update --all
If the error persists, try to update the packages in your base
environment.
base
environment.conda activate base
anaconda
package to remove unnecessary packages and install
missing/outdated packages.conda install anaconda
base
environment.conda update --all
If the error persists, you could try to force update the virtual environment.
You can use the conda info --envs
command to get the name of the active
environment.
conda info --envs
The command shows an asterisk next to the path of the currently active environment.
The command is formatted as follows.
conda update -n YOUR_ENV -c defaults conda --force
Make sure to replace the YOUR_ENV
placeholder with the name of your
environment.
For example, to force update the base
environment, issue the following
command.
conda update -n base -c defaults conda --force
If the issue persists after running the command, try to issue the following 2 commands.
conda install anaconda conda update --all
If the error persists, you can also try to revert the environment to a previous version.
Issue the following command to list the history of each change to the current environment.
conda list --revisions
Notice that each change is associated with a revision number, e.g. (rev 11)
.
You can try to revert the environment to a working state.
You can install a specific revision number by issuing the following command.
conda install --revision 11
Make sure to replace 11
with your revision number.
The command restores the environment to a previous revision.
conda
with the --force-reinstall
flagIf the error persists, try to install conda
with the
--force-reinstall flag.
base
environment.conda activate base
conda
package with the --force-reinstall
flag.conda install conda --force-reinstall conda install conda --force-reinstall
Note that it might be necessary to run the command multiple times.
conda update --all
If the error persists, try to uninstall and then reinstall the packages that caused the issue.
You can use the conda remove package_name
command to uninstall the package.
For example, if your error message looks as follows.
- defaults/win-64::absl-py - defaults/win-64::requests== - defaults/win-64::scipy==
anaconda-
.conda remove absl-py conda remove requests conda remove scipy
You can also uninstall the packages using a single command.
conda remove absl-py requests scipy
conda update --all
conda install absl-py conda install requests conda install scipy
I've also written an article on how to install a specific version of an Anaconda package.
You can learn more about the related topics by checking out the following tutorials: