problem opening jupyter notebook on debian 10

raman kumar

Member
Joined
Aug 3, 2020
Messages
261
Reaction score
15
Credits
2,567
sir ,i have installed anaconda on my pc , but jupyter notebook and jupyter lab are not opening either through terminal and anaconda navigator.
 

Attachments

  • Screenshot_20200927_145919.png
    Screenshot_20200927_145919.png
    142.4 KB · Views: 416
Last edited:


You need to activate anaconda, I do it like this:
Code:
source /opt/anaconda/bin/activate root
Just change the path of the location where you have anaconda installed, then you can run anaconda-navigator and from there you can launch jupyter notebook or you can just run it straight away using jupyter-notebook. Also you like the error says it is recommended to run it as normal user since you will be using it like any other normal application.
 
Last edited:
raman@raman:~$ source /opt/anaconda/bin/activate root
bash: /opt/anaconda/bin/activate: No such file or directory
raman@raman:~$ cd /home/raman/Downloads
raman@raman:~/Downloads$ source /opt/anaconda/bin/activate root
bash: /opt/anaconda/bin/activate: No such file or directory
raman@raman:~/Downloads$ cd /home/raman/Downloads/Anaconda3-2020.07-Linux-x86_64.sh
bash: cd: /home/raman/Downloads/Anaconda3-2020.07-Linux-x86_64.sh: Not a directory
raman@raman:~/Downloads$ source /opt/anaconda/bin/activate root
bash: /opt/anaconda/bin/activate: No such file or directory
raman@raman:~/Downloads$



should i install anaconda again
 
You installed anaconda3 under /root/anaconda3, your normal user doesn't have the permissions to access the directory structure there. Move anaconda3 to /opt/anaconda3, then your normal user should be able to access it.
 
how to Move anaconda3 to /opt/anaconda3.
As root user: mv /root/anaconda3 /opt
This way it will be available to all users, and otherwise you could just move it somewhere in /home/raman directory structure. Or you could just run the installer als your normal user and it would ask you if the default installation path is okay with you which will be somewhere in the directory structure of the user executing the installer.
 
From your normal user you need to activate it again:
source /opt/anaconda3/bin/activate root
 
Can you share the content of this file: /opt/anaconda3/bin/activate.
 
#!/bin/sh
_CONDA_ROOT="/root/anaconda3"
# Copyright (C) 2012 Anaconda, Inc
# SPDX-License-Identifier: BSD-3-Clause
\. "$_CONDA_ROOT/etc/profile.d/conda.sh" || return $?
conda activate "$@"
 
Change:
From: _CONDA_ROOT="/root/anaconda3"
To: _CONDA_ROOT="/opt/anaconda3"

Then try activating it again: source /opt/anaconda3/bin/activate root
Then run anaconda-navigator to then select juypter notebook.
 
on opening activate file in KATE, i was able to replace root with opt.

#!/bin/sh
_CONDA_ROOT="/opt/anaconda3"
# Copyright (C) 2012 Anaconda, Inc
# SPDX-License-Identifier: BSD-3-Clause
\. "$_CONDA_ROOT/etc/profile.d/conda.sh" || return $?
conda activate "$@"


i am copy and pasting output of terminal

raman@raman:~$ source /opt/anaconda3/bin/activate root
bash: /root/anaconda3/bin/conda: Permission denied
raman@raman:~$ su
Password:
root@raman:/home/raman# source /opt/anaconda3/bin/activate root
bash: /root/anaconda3/bin/conda: No such file or directory
root@raman:/home/raman# source /opt/anaconda3/bin/activate opt
bash: /root/anaconda3/bin/conda: No such file or directory
root@raman:/home/raman#




other outputs

raman@raman:~$ jupyter-notebook
bash: jupyter-notebook: command not found
raman@raman:~$ su
Password:
root@raman:/home/raman# jupyter-notebook
bash: jupyter-notebook: command not found
root@raman:/home/raman#
 
In this file: /opt/anaconda/etc/profile.d/cond.sh, make sure these look like this:
export CONDA_EXE='/opt/anaconda3/bin/conda'
export CONDA_PYTHON_EXE='/opt/anaconda3/bin/python'

Your file probably still has /root/anaconda3 there.
 
yes root was still there,i changed it in KATE. but no profit.

export CONDA_EXE='/opt/anaconda3/bin/conda'
export _CE_M=''
export _CE_CONDA=''
export CONDA_PYTHON_EXE='/opt/anaconda3/bin/python'

# Copyright (C) 2012 Anaconda, Inc
# SPDX-License-Identifier: BSD-3-Clause




raman@raman:~$ source /opt/anaconda3/bin/activate root
bash: /opt/anaconda3/bin/conda: /root/anaconda3/bin/python: bad interpreter: Permission denied
raman@raman:~$ su
Password:
root@raman:/home/raman# source /opt/anaconda3/bin/activate root
bash: /opt/anaconda3/bin/conda: /root/anaconda3/bin/python: bad interpreter: No such file or directory
root@raman:/home/raman# jupyter-notebook
bash: /opt/anaconda3/bin/jupyter-notebook: /root/anaconda3/bin/python: bad interpreter: No such file or directory
root@raman:/home/raman#
 
Then try activating again and then running anaconda-navigator again.
 
should i install it again
What does your /root/.bashrc look like? Otherwise you can just remove /opt/anaconda3, and then run the anaconda installer as normal user and it will install it in a location that you should be able to run it from.
 

Members online


Latest posts

Top