Terminal problem- jupyter notebook

Hey Everyone! I recently started having a problem opening Jupyter notebook in my terminal and I was wondering if anyone could help me. I am super new to using the terminal and to coding in general so I am pretty lost. I have opened Jupyter notebook several times and completed the exercises but the last time I tired it gave me this error:

-bash: /Users/name/.bash_profile: line 2: syntax error near unexpected token >' -bash: /Users/name/.bash_profile: line 2: >>> conda initialize >>>’
Names-Air:~ name$ jupyter notebook
-bash: jupyter: command not found

Is there a relatively easy fix to this? I really want to be able to finish the python program I have been working on.

Thanks so much! :slight_smile:

I think there’s a problem within the .bash_profile file with some invalid syntax. Since that line (and probably the lines near it) seem to be setting up conda for bash you miss adding various conda commands to your shell environment.

In short your .bash_profile is wrong and means jupyter notebook isn’t on your PATH.

If you can work out what line is causing the issue then you can fix it; or, if you’re not sure then remove all the conda lines from this file (.bash_profile) and run conda init bash to get conda to add them back for you (for a bash shell). Close and re-open your terminal at this point.

Also, one more thing…are you on a Mac? If so, what OS?
If it’s Catalina or Big Sur, then the default is no longer bash but .zsh. So, your profile would be zsh not bash (unless you specified it to be bash when you downloaded anaconda).