1

After having upgrade ipython and tried to install R kernel in jupyter, I can't run anymore any notebook with a python 2 kernel (or with a R kernel or a julia kernel) on jupyter (ubuntu 15.04).

Jupyter was installed using sudo pip install -U jupyter[all]

I also notice that I can't use the ipython version from the repository after if i remove the version installed with pip.In that case, I have :

$ ipython notebook
bash: /usr/local/bin/ipython: Aucun fichier ou dossier de ce type
jeanpat@jeanpat-WA50SHQ:~$ which ipython
/usr/bin/ipython

Trying to run ipython as follow do not solve:

$ /usr/bin/ipython notebook
2015-08-24 17:50:38.150 [NotebookApp] Using existing profile dir: u'/home/jeanpat/.ipython/profile_default'
2015-08-24 17:50:38.157 [NotebookApp] Using system MathJax
2015-08-24 17:50:38.170 [NotebookApp] Serving notebooks from local directory: /home/jeanpat
2015-08-24 17:50:38.170 [NotebookApp] 0 active kernels 
2015-08-24 17:50:38.170 [NotebookApp] The IPython Notebook is running at: http://localhost:8888/
2015-08-24 17:50:38.170 [NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

(process:7153): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
2015-08-24 17:50:43.499 [NotebookApp] Creating new notebook in /
2015-08-24 17:50:44.319 [NotebookApp] Kernel started: d08486bf-5789-457f-93ec-d06a25def67e
2015-08-24 17:51:15.224 [NotebookApp] Kernel restarted: d08486bf-5789-457f-93ec-d06a25def67e
WARNING:tornado.access:404 GET /api/kernels/0a726dca-894a-4e7d-8b9c-7d62033632f1/channels?session_id=0DB4052BEBDC48048A7EEAE06B445FE0 (127.0.0.1) 20.41ms referer=None

So How can get back to a sane ipython 2 notebook environment (even if R, julia, python3 do not work) ? Thank you.

Jean-Pat
  • 1,839
  • 4
  • 24
  • 41

1 Answers1

1

I can only make some educated guesses, since we would need to see more of your environment ($PATH, $PYTHONPATH) you are using to start ipython, but here is what I would generally recommend:

1) You possibly have some permission problems, since you installed jupyter with sudo, something I would not generally recommend.

Either try to run ipython with sudo to see if that already solves anything or uninstall ipython with sudo pip uninstall ipython and re-install it with `pip install --user ipython[notebook].

It might also be worth resetting your configuration directory /home/jeanpat/.ipython.

2) When installing ipython it is important to know which pip (and therefore which python environment) you are currently using. Are you using virtual environments? It might be that you are simply starting ipython in a python3 environment and therefore can not run python2 code.

Just run python in the same console you want to start ipython from and check if that is generally working correctly and also check which version it brings up (2.X or 3.X)?

3) Depending on your intentions of what to do with ipython, many people recommend using Anaconda to manage python installation and packages. It might be worth looking into this. I am not using it personally, but it might reduce some of the python config headaches I am having lately.

Chris
  • 3,245
  • 4
  • 29
  • 53
  • There' something wrong in my home since jupyter notebook run fine from another account. Up to now deletion of several hidden files/dir (.ipython, .jupyter, ...) didn't fix the environnement (installed with sudo pip ..). When a closed virtualenv is used, jupyter is ok. When jupyter is used from a virtualenv using the system packages (sudo pip), jupyter doesn't run. The guilty may be the R Kernel I tried to install. A real mess ... Anaconda run fine, but miss some packages and I don't known if it can use cuda for some packages. – Jean-Pat Aug 28 '15 at 12:08
  • 1
    Sounds like you should uninstall all those kernels and re-install them one by one to check, if you can't locate the issue better. – Chris Aug 28 '15 at 15:55
  • 1
    Removing ~/.local/share/jupyter fixed the problem.Running with the debug mode (jupyter notebook --debug) showed me where jupyter was looking for its kernels. – Jean-Pat Sep 02 '15 at 21:01