Skip to main content
This page includes common troubleshooting topics for Anaconda Distribution. If you encounter an issue that is not listed here, you can obtain support for Anaconda through the Anaconda community forums. For Anaconda installation or technical support options, visit our support offerings page.

command not found: conda


Cause
The command not found: conda error occurs when your command line interface (CLI) can’t find the conda command in order to use it. This might be because:
  • You don’t have conda properly initialized.
  • You have set auto_activate_base to false.
  • You’re using a shell that conda doesn’t support.
  • Conda is not installed or the install was incomplete or corrupted.
These issues primarily occur on macOS/Linux computers. Anaconda Distribution and Miniconda installations on Windows include Anaconda Prompt, which opens with conda initialized by default.

Solution
If you recently installed Anaconda Distribution or Miniconda, make sure you closed and reopened your CLI to make conda’s initialization take effect.
If you don’t want to close your CLI, you can also use one of the following source commands to refresh your shell:
source ~/.bashrc
Use the command that matches your shell.
You can also initialize conda directly from its bin directory:
<PATH_TO_CONDA>/bin/conda init
Replace <PATH_TO_CONDA> with a path to your conda installation.
To see the value for auto_activate_base, run the following command:
conda config --describe auto_activate_base
If your terminal returns false, this means that conda is not automatically activating your base environment when you start a new shell. This behavior emulates your system Python, and some users prefer to have their conda environment be inactive until they need it. However, this is not conda’s default behavior after installation.To change the value of auto_activate_base to true, run the following command:
conda config --set auto_activate_base true
If you have auto_activate_base set as false, the conda command will still be available as a shell function, but your base environment will not be active when a new shell is started. To activate your base environment, run conda activate.
For information on which shells conda supports, see Conda activate in the official conda documentation.
If you have tried to initialize conda in your shell but it didn’t work, try uninstalling and reinstalling Anaconda Distribution or Miniconda.
Make sure that you say yes to the initialization option, and, if installing from the CLI, reinitialize your shell by restarting it or using its source command. For more information, see Initialize conda in your shell.

PackagesNotFoundError: The following packages are not available from current channels


Cause
The PackagesNotFoundError occurs when conda cannot find the requested packages in any of your currently configured channels in order to install or update it. This might be because:
  • The package name is misspelled.
  • The package doesn’t exist in the channels included in your conda configuration file (.condarc).
  • The package is not available for your operating system or architecture.

Solution
Verify that your package name is spelled correctly and that your command contains no syntax errors. For more information about command syntax, see Using conda install.
If you’re unsure what the correct command to install the package is, you can find it on the package’s details page.Search Anaconda.org or your Anaconda Platform channels for your desired package, and view its details. Each package’s details page provides a copyable command to install the package from that channel. Run that command to install the package in your currently active environment.
Remember to pay close attention to the command’s syntax! The command you copy might not be the exact command you want to run, depending on your use case. Anaconda.org uses the double-colon syntax for channel specification, while Anaconda Platform uses the channel flag syntax by default. For more information, see Installing packages from a specific channel.
Add the missing channel to your .condarc file. However, keep in mind that any channels listed in the channels: section of your .condarc file will be searched by conda every time you install a new package.
Check your system architecture to determine if the package is compatible. This information is found under platform: in your conda info output.
conda info
Conda restricts searches to packages that are compatible with your system architecture. If the package you’re looking for is not available for your system architecture, it is not listed in conda’s package search results.

DirectoryNotACondaEnvironmentError: The target directory exists, but it is not a conda environment


Cause
This error means that you don’t have a conda environment currently active. You might have used conda deactivate while in your base environment and deactivated conda.

Solution
Activate your base environment or another environment:
# Activate your base environment
conda activate

# Activate an environment by name
conda activate <ENV_NAME>
Replace <ENV_NAME> with the name of the environment.

EnvironmentNotWriteableError


Cause
You might see this error when trying to install or update a package, when attempting to create an environment in a restricted file location, or when attempting to modify an environment that was created by a user with admin permissions. This error is usually caused when you don’t have the permissions to edit files in the directory where the environment exists. These are known as write permissions.

Solution
Create your own environment instead, in a directory you don’t need admin permissions to work in, such as your home directory:
conda create --name <ENV_NAME> --prefix <PATH_TO_USER_DIRECTORY>
Replace <ENV_NAME> with the name of your environment.
Replace <PATH_TO_USER_DIRECTORY> with the file path to a directory you have control over.
Talk with your system administrator or the user that created the environment in a location that was not editable by you. They can use conda export to share an environment with you and you can then use that exported environment.yml file to create a new environment.Run the following command in the same directory as the environment.yml file or include the file path to the environment.yml file:
conda create --file environment.yml --prefix <PATH_TO_USER_DIRECTORY>
Replace <PATH_TO_USER_DIRECTORY> with the file path to a directory you have control over.

ModuleNotFoundError: No module named X


Cause
A ModuleNotFoundError occurs when your project tries to use a package that isn’t available in your currently active environment. You could be in the wrong environment for the project you’re working on, or the package could simply not have been included in your project’s environment.

Solution
Verify you are using the correct environment. Conda displays your currently active environment in parenthesis beside your command line interface (CLI) prompt. Another way to see your currently active environment is with the following command:
conda info --envs
An asterisk is displayed next to your currently active environment:
Environment list example
(my-active-environment) ~ conda info --envs

# conda environments:
#
base                      /Users/user1/miniconda3
my-active-environment   * /Users/user1/miniconda3/envs/my-active-environment
python312                 /Users/user1/miniconda3/envs/python312
If you are not in the correct environment, switch to your project’s intended environment. For more information, see Switching between environments.If your environment is missing the needed package, install it in your environment. For more information, see Installing conda packages.

”This package is incompatible with this version of macOS” error when running a .pkg installer on OSX


Cause
When running the .pkg installer, you may encounter this error during the “Installation” step:

This error occurs when the installation attempts to write to a directory for which it does not have write permissions.

Solution
Manually select an appropriate install location. The following example shows how to select your user’s home directory.
  1. Re-run the installer and click through until you reach either the Installation Type or Destination Select page.
  2. If you reach the Installation Type page first, click Change Install Location…. This will take you to the Destination Select page.
  3. Click Install on a specific disk….
  4. Select the appropriate destination drive. Then click Choose Folder….
  5. Select your user’s home directory (for example, /Users/john.doe/). Then click Choose.
  6. In the message box, confirm the name of the install folder you chose in the previous step. Then click Continue.
  7. Click Install, and then proceed with the rest of the installation.
If you continue to receive the same error message, please open an issue here, and be sure to include the installation log output from your install.log file, which can be found at /var/log/install.log.

”The installation failed” message when running a .pkg installer on OSX


Cause
When running the .pkg installer, you may see this message at the end of the installation:
If so, check for the following:
  1. Open your /var/log/install.log file and check whether the most recent lines show errors following a call to conda init --all.
    open /var/log/install.log
    
  2. In your $HOME directory, check whether the owner of your shell config files is root:
    ls -la ~/.bash_profile ~/.config/fish/config.fish ~/.tcshrc ~/.xonshrc ~/.zshrc
    

Solution
If both of the above are true, do the following:
  1. Change the owner of your shell config files to your current user:
    sudo chown -R $USER ~/.bash_profile ~/.config/fish/config.fish ~/.tcshrc ~/.xonshrc ~/.zshrc
    
  2. Uninstall the previous installation. Then re-run the installer, making sure to select the Install for me only option.

Receiving a 403 Forbidden error from an Anaconda channel


Cause
A 403 Forbidden error occurs when you attempt to access a resource you don’t have permissions for—such as a channel, package, or API endpoint.

The 403 error you are receiving may look like the following:
AnacondaAuthError: Received authentication error (403) when accessing <CHANNEL_URL>. If your token is invalid or expired, please re-install with anaconda token install.
This error is likely because your token is invalid or expired, but can also be because Anaconda is blocking your access because of a potential terms of service violation.

Solution
Run anaconda token install to issue and set a new token for yourself, then try again.

If the 403 Forbidden error persists, ensure you are not blocked by a Terms of Service violation by consulting our Terms of Service error page.

If you believe you have been blocked in error, please open a support ticket.

HTTP 000 CONNECTION FAILED


Cause
This is generally caused by a proxy misconfiguration.

Solution
Follow instructions on Using Anaconda behind a company proxy to configure your proxy correctly.

conda update anaconda command does not install the latest version of the anaconda metapackage


Cause
The anaconda metapackage was removed from Anaconda Distribution installers in February of 2023 and no longer appears in your base environment by default. This troubleshooting topic assumes you are working with package incompatibilities in an environment containing the anaconda metapackage.
If you have installed packages that are incompatible with the latest version of the Anaconda metapackage, running conda update anaconda updates the Anaconda metapackage to the latest compatible version. Keep in mind this might not be the latest version.

Solution
  1. Obtain a list of the conflicting packages by running conda update anaconda or conda install anaconda=2023.07.
    Replace 2023.07 with the latest version number.
  2. Enter n to cancel the installation or update.
  3. Once you know which packages are conflicting, you can:
    • update all current packages without upgrading to the latest version of the anaconda metapackage, or
    • remove the conflicting packages and then upgrade to the latest version of the anaconda metapackage.
To update all current packages without upgrading to the latest version of the anaconda metapackage:
  1. Remove the anaconda metapackage itself by running the following command:
    conda remove anaconda
    
  2. Update all currently installed packages by running the following command:
    conda update --all
    
To remove the conflicting packages and upgrade to the latest version of the anaconda metapackage:
  1. Remove the conflicting packages by running the following command for each one:
    conda remove <PACKAGE>
    
  2. Update to the latest version of the anaconda metapackage:
    conda update anaconda
    

Recovering your Anaconda installation


Cause
If your Anaconda installation has become corrupted and is in a state where normal conda commands are not functioning, use the following steps to repair Anaconda and preserve your installed packages and environments.

Solution
  1. Download a new installer, then follow the instructions for your operating system.
    Use the actual path, filename, and directory name for your installation.
    1. Open a terminal application, such as Command Prompt.
    2. Change your original installer’s name so you do not overwrite it:
      move anaconda3 anaconda_old
      
    3. Run the Anaconda.exe installer as usual and use robocopy to sync the directories:
      robocopy anaconda_old anaconda3 /S
      
    4. Delete your old Anaconda installation directory:
      rd /s anaconda_old
      
  2. Run conda list to view the packages from the previous installation.
  3. Run conda info --envs to list the environments created in the previous installation, which are now available in the new installation.

Channels list adding extra channels


Cause
A .condarc file has been added to the root folder of your Anaconda Distribution and Miniconda installations. This file has a channels: list that contains either:
  • a list of hard-coded URLs
  • the defaults channel
When using channels, conda merges all of your computer’s .condarc files together in specific ways. For more information on how conda uses your .condarc files, see the Searching for .condarc section of the official conda documentation.

All channels: lists in your .condarc files are merged together when conda searches for packages. This causes the Anaconda default URLs to be appended to (added to the end of) your channels: list.

To see all the .condarc files influencing your currently active conda environment, run the following command:
conda config --show-sources
This returns a list of .condarc file locations and their contents.
Your installation directory .condarc file should be in the folder where you installed Anaconda Distribution or Miniconda, most likely similar to one of the following:
C:\Users\<USERNAME>\anaconda3
C:\Users\<USERNAME>\miniconda3
/Users/<USERNAME>/anaconda3
/Users/<USERNAME>/miniconda3
/opt/anaconda3
/opt/miniconda

Solution
There are a few ways you can solve this issue, depending on how you use your .condarc file:

If you have your channels configured in a different .condarc file (whether you use defaults or not), you can also delete the installation directory .condarc file.
Make sure that you always have at least one .condarc file with a channels: list defined. Conda requires this to function.
  1. Locate the installation directory .condarc file using conda config --show-sources.
  2. Delete the installation directory .condarc file. This is a hidden file on macOS and Linux and is not visible in file browsers under normal circumstances.
If you do not want to use the defaults channels and cannot edit or remove the installation directory .condarc file (for example, you installed on macOS using the graphical installer without sudo access):
  • You must use the --override-channels flag with every conda command that installs or updates packages.
  • You must also specify at least one channel using the --channel (or -c) flag.
Example:
conda install --override-channels --channel conda-forge numpy
This tells conda to ignore all channels in your .condarc files and only use the channels you explicitly specify to install or update packages and their dependencies.
If you continue to experience issues, please open a support ticket.

Anaconda installer download problems


Cause
The Anaconda installer files are large (over 600 MB), and some users have problems with errors and interrupted downloads when downloading large files.

Solution
  1. Download and install the smaller Miniconda (between 70 and 100 MB).
  2. Download and install the remaining packages in Anaconda by using the following command:
    conda install anaconda
    
If the package downloads are interrupted, just run conda install anaconda again. Conda only downloads the packages that were not finished in any previous attempts.

Cannot see Anaconda menu shortcuts after installation on Windows


Cause
After installing on Windows, the Anaconda Prompt and Anaconda Navigator shortcuts do not appear in the Windows Start menu.

This may be caused by the way Windows updates the Start menu, or by having multiple versions of Python installed that are interfering with one another. Existing Python installations, installations of Python modules in global locations, or libraries that have the same names as Anaconda libraries can all prevent Anaconda from working properly.

Solution
If Start menu shortcuts are missing, Microsoft recommends rebooting your computer or restarting Windows Explorer.

If that doesn’t work, clear your $PYTHONPATH environment variable, if applicable, and re-install Anaconda.

Other potential solutions are covered in the “Conflicts with system state” section of the following blog post.

Windows error: Failed to create Anaconda menus or Failed to add Anaconda to the system PATH


Cause
During installation on a Windows system, a dialog box appears that says “Failed to create Anaconda menus, Abort Retry Ignore” or “Failed to add Anaconda to the system PATH.” There are many possible Windows causes for this.

Solution
Try these solutions, in order:
  • Do not install on a PATH longer than 1024 characters.
  • Turn off anti-virus programs before installing, then turn the anti-virus programs back on.
  • Uninstall all previous Python installations.
  • Clear all PATHs related to Python in sysdm.cpl file.
  • Delete any previously set up Java PATHs.
  • If JDK is installed, uninstall it.
To find your path variable:
  1. Search for “environment variables” in the search in your taskbar.
  2. Select Edit the System Environment Variables in the sidebar.
  3. Click Environment Variables in the System Properties dialog.
  4. Highlight the path variable for your user.
  5. Click Edit.

Files left behind after uninstalling Anaconda on Windows


Cause
Some users may need to keep settings files and other users may need to delete them, so Anaconda leaves some settings files in place when it is uninstalled. Specifically, the directories .spyder2, .ipython, .matplotlib, and .astropy remain. Depending on your version of Windows, these may be in C:\Documents and Settings\<USERNAME> or in C:\Users\<USERNAME>.
Replace <USERNAME> with your Windows username as it appears in the Documents and Settings or Users folder.

Solution
Manually delete any unneeded settings files.