Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python miniconda

Juliette Tworsey
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,425 Points

command not found: conda

Hi Kenneth,

I have installed Miniconda3 via the instructions in this tutorial successfully. I have also stopped and restarted my terminal, but I am getting an error when trying to run conda install -n treehouse numpy:

command not found: conda

I have done some searching around the web, but I cannot seem to find a solution that remedies this. I'm attempting to run the command on a MacOS High Sierra 10.13.6. How can I remedy this?

Thank you for this workshop!

Juliette

3 Answers

Just in case someone else is bogged down by this. I faced the same problem, my .bash_profile had the paths all set by Anaconda but every time I tried conda cpmmands it gave me the error zsh: command not found: conda . Here is how I solved it

cd
# this command will take you to the home dir
ls -a
# this command list all files (hidden ones inlcuded) check if there is a .bash_profile file. 
# If it does not exist then `touch .bash_profile` in same location
open -e .bash_profile
# or `nano ~/.bash_profile` if using nano
# or `vim ~/.bash_profile` if using vim
 # this command opens the file with the text editor. If the path to Anaconda exists, simply do 
source ~/.bash_profile

So every other time you stumble on the zsh: command not found: conda error just do the command

source ~/.bash_profile

I'm guessing that conda is not in your path. Perhaps you don't have a .bash_profile so it didn't get added.

What happens when you type this into your terminal?

open ~/.bash_profile

If you have it, it should open in TextEdit.

If it says you don't have it, create it and open it:

touch ~/.bash_profile; open ~/.bash_profile

Then add this and save:

PATH=$PATH:$HOME/anaconda/bin

Quit and restart terminal. Check that it worked:

conda --version

p.s. You can also use nano instead of open and it will open it in the terminal. I prefer this because TextEdit can add formatting that screws with your code. But TextEdit may be easier to use for a beginner and you can change settings so it doesn't apply formatting.

https://stackoverflow.com/questions/30461201/how-do-i-edit-path-bash-profile-on-osx https://stackoverflow.com/questions/18675907/how-to-run-conda

Juliette Tworsey
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,425 Points

Hi Ursaminor,

Thanks so much for responding!

When I run cat ~/.bash_profile I can see that the file is there.

This is the $PATH that has been created at the end of the file/script:

added by Miniconda3 installer
export PATH="/Users/my-fullname/miniconda3/bin:$PATH"

Thanks again!

I might try pulling Anaconda as a Docker image instead to see what happens, but first, I'm going to shut down my computer entirely and re-open my terminal again (as simply closing it doesn't seem to be doing the trick).

Cheers:-)

Juliette