3

I have recently upgraded to Ubuntu 16.04 and installed jupyter notebook following either of the standard procedures indicated here. The installation procedure runs smoothly and completes without exceptions (both with pipand anaconda). At the moment of running the notebook I get, though

$ jupyter notebook
-sh: jupyter: command not found

and similarly

$ which jupyter

does not give back any output, as if it were nowhere to be found. However, manually looking into all the possible locations I have found that into ~/.local/lib the notebook does start off correctly with

$ ~/.local/lib jupyter notebook

and it is the only way I can operate it.

  • How can I change the path where jupyter is installed, in order to launch it normally without having to search into the hidden folders?

  • I have tried to un-install it in order to install it again with $sudo apt-get remove --purge but since the path is hidden it does not recognize the application as already installed, hence the un-installation does not proceed.

If it can be useful, I have upgraded the Ubuntu version following a new installation from scratch, therefore I doubt conflict with existing versions and previous paths may be the cause.

edwinksl
  • 23,789
gented
  • 388
  • I am surprised you found jupyter in ~/.local/lib. Can you see if you can find jupyter in ~/.local/bin? – edwinksl Jun 30 '16 at 08:54
  • I have edited to correct the mispelling: I find it in ~/.local/lib and I do not find it in ~/.local/bin. – gented Jun 30 '16 at 08:59
  • 1
    See http://askubuntu.com/q/761559/15003. – edwinksl Jun 30 '16 at 09:09
  • One way to add jupyter to your $PATH is mentioned in the comment to the answer for the question I posted. – edwinksl Jun 30 '16 at 09:28
  • I see; I will try to add jupyter to my $PATH as suggested, although I did not specify the option pip install --user. It seems however, as stated in the next comment, that for latest Ubuntu versions pip automatic default to that unless specified otherwise. Is there any way to "undo" the --user? – gented Jun 30 '16 at 09:59

3 Answers3

5

I installed using Anaconda on Ubuntu 14.04. It worked for me after I added anaconda to my Path. In the terminal, type the following:

export PATH=~/anaconda3/bin:$PATH
anonymous2
  • 4,298
1

I had the same problem and it was solved by re-installing anacoda again..

try deleting the "anaconda2" folder from your home directory, and then change the location where Anacoda installation file (.sh file) is located. Put it in the place where all your work will be there, and re-run the it again using

bash Anaconda2-***-Linux-x86_64.sh 
Mari202
  • 31
  • 3
1

If you installed Jupyter notebook for Python 2 using 'pip' instead of 'pip3' (some other cases might apply - but this was my case), it might work to run:

ipython notebook

This worked for me, even though I used pip to install Jupyter. It may be leftover from before the splitting away of ipython notebook into jupyter.

SRDC
  • 190