"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > Why does my Cona command not work after installing Anaconda?

Why does my Cona command not work after installing Anaconda?

Posted on 2025-04-18
Browse:272

Why Doesn't My Cona Command Work After Anaconda Installation?

Troubleshooting Conda Invocation

Despite successfully installing Anaconda and confirming Python availability, you encounter an error when attempting to run the "conda" command. This typically indicates an issue with the path configuration, as evident from the "-bash: conda: command not found" message.

To resolve this, you need to ensure that the Conda executable is accessible from your system's path. Here are the steps to address this issue:

1. Correct Path Configuration:

  • For Anaconda 2: Execute export PATH=~/anaconda2/bin:$PATH in the terminal.
  • For Anaconda 3: Use export PATH=~/anaconda3/bin:$PATH.
  • For Anaconda 4: Launch the Anaconda Prompt, which automatically sets the correct path.

2. Verify Path Modification:

  • Run conda --version to confirm that the path modification was successful.

3. Permanent Path Modification:

  • To make the path change permanent, open the "~/.bashrc" file using sudo nano ~/.bashrc.
  • Add the appropriate path line (e.g., export PATH=~/anaconda3/bin:$PATH).
  • Save and close the file.
  • Activate the changes with source .bashrc.

4. Install Anaconda Navigator:

  • Execute conda install anaconda-navigator.
  • If not installed, follow the official Anaconda installation instructions again.

5. Reference Video Tutorial:

  • Visit https://youtu.be/Pr25JlaXhpc for additional guidance.
Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3