problem opening jupyter notebook on debian 10



f33dm3bits

Gold Member
Gold Supporter
Credits
6,026
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 kumar

Member
Credits
1,166
[email protected]:~$ source /opt/anaconda/bin/activate root
bash: /opt/anaconda/bin/activate: No such file or directory
[email protected]:~$ cd /home/raman/Downloads
[email protected]:~/Downloads$ source /opt/anaconda/bin/activate root
bash: /opt/anaconda/bin/activate: No such file or directory
[email protected]:~/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
[email protected]:~/Downloads$ source /opt/anaconda/bin/activate root
bash: /opt/anaconda/bin/activate: No such file or directory
[email protected]:~/Downloads$



should i install anaconda again
 

f33dm3bits

Gold Member
Gold Supporter
Credits
6,026
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.
 

f33dm3bits

Gold Member
Gold Supporter
Credits
6,026
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.
 

f33dm3bits

Gold Member
Gold Supporter
Credits
6,026
From your normal user you need to activate it again:
source /opt/anaconda3/bin/activate root
 

f33dm3bits

Gold Member
Gold Supporter
Credits
6,026
Can you share the content of this file: /opt/anaconda3/bin/activate.
 

f33dm3bits

Gold Member
Gold Supporter
Credits
6,026
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.
 

raman kumar

Member
Credits
1,166
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 "[email protected]"


i am copy and pasting output of terminal

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




other outputs

[email protected]:~$ jupyter-notebook
bash: jupyter-notebook: command not found
[email protected]:~$ su
Password:
[email protected]raman:/home/raman# jupyter-notebook
bash: jupyter-notebook: command not found
[email protected]:/home/raman#
 

f33dm3bits

Gold Member
Gold Supporter
Credits
6,026
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.
 

raman kumar

Member
Credits
1,166
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




[email protected]:~$ source /opt/anaconda3/bin/activate root
bash: /opt/anaconda3/bin/conda: /root/anaconda3/bin/python: bad interpreter: Permission denied
[email protected]:~$ su
Password:
[email protected]:/home/raman# source /opt/anaconda3/bin/activate root
bash: /opt/anaconda3/bin/conda: /root/anaconda3/bin/python: bad interpreter: No such file or directory
[email protected]:/home/raman# jupyter-notebook
bash: /opt/anaconda3/bin/jupyter-notebook: /root/anaconda3/bin/python: bad interpreter: No such file or directory
[email protected]:/home/raman#
 

f33dm3bits

Gold Member
Gold Supporter
Credits
6,026
Then try activating again and then running anaconda-navigator again.
 

f33dm3bits

Gold Member
Gold Supporter
Credits
6,026
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