Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I am trying to run jupyter notebook through
Anaconda
in mac but it is showing :
-bash: touch: command not found
MacBook-Air:~ ajay$ /anaconda3/bin/jupyter_mac.command ; exit;
/anaconda3/bin/jupyter_mac.command: line 1: dirname: command not found
/anaconda3/bin/jupyter_mac.command: line 3: /jupyter-notebook: No such file or directory
logout
Saving session...-bash: date: command not found
-bash: touch: command not found
...copying shared history...-bash: cp: command not found
...saving history...-bash: cat: command not found
-bash: cat: command not found
truncating history files...
...completed.
-bash: find: command not found
-bash: shlock: command not found
[Process completed]
The content of jupyter_mac.command
are :
DIR=$(dirname $0)
$DIR/jupyter-notebook
and when I run jupyter notebook
in terminal it shows
/bin/sh: osascript: command not found
I also checked to see jupyterlab
on Anaconda
and it was working fine but jupyter notebook
was not opening.
Few days ago, I installed mongodb
on my mac and when I run echo $PATH
it shows /anaconda3/bin:/usr/local/mongodb/bin:??
I, even, reinstalled anaconda
and before reinstalling deleted its folder from the drive but it still giving the same problem.
Being a new mac user, I am not able to understand what is happening, so I gave the important details.
–
–
–
Your PATH tells the shell where to find programs. Yours is messed up, so it cannot find anything. It is probably set in $HOME/.profile
so you need to open that file in your editor and look for export PATH=...
.
You probably want it set something like:
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/anaconda3/bin:/usr/local/mongodb/bin
In future, where you add anything to your PATH, you need to carry forward whatever it was previously set to and append like this:
export PATH="$PATH":/some/new/directory
Once you have set your PATH correctly, start a new Terminal and run:
echo $PATH
in it to see if looks good.
–
–
If you did a fresh install of Anaconda on macOS Catalina, you can fix it with the following command:
export PATH=/opt/anaconda3/bin:$PATH
That worked for me, but in case this is not the correct path for you, you can run Jupiter notebook from the GUI of Anaconda navigator, and check on the terminal window that is opened automatically where is the anaconda3 folder. Then just add that to your path ;)
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.