damianavila / RISE

RISE: "Live" Reveal.js Jupyter/IPython Slideshow Extension
Other
3.67k stars 416 forks source link

Jupyter notebook not working in conda base after creating and installing rise in new conda environment #512

Open riddhisw opened 4 years ago

riddhisw commented 4 years ago

As documented here: https://stackoverflow.com/questions/58046363/jupyter-notebook-not-working-in-conda-base-environment-after-creating-a-new-envi

I installed rise in a new conda environment using the following command:

conda  create -n risejupyter python
conda install -c conda-forge rise
conda install --name risejupyter numpy scipy matplotlib statsmodels numba jupyter

However, my conda base environment is now broken and this code no longer launches Jupyter:

conda activate # activates base environment jupyter notebook

(base) riddhisw@riddhisw-Oryx-Pro:~$ jupyter notebook Traceback (most recent call last): File "/home/riddhisw/anaconda2/bin/jupyter", line 4, in import jupyter_core.command ModuleNotFoundError: No module named 'jupyter_core'

The commands jupyter-notebook or notebook also fail:

import notebook.notebookapp ModuleNotFoundError: No module named 'notebook'

The PATH variable can find the correct anaconda directories:

riddhisw@riddhisw-Oryx-Pro:~$ $PATH bash: /home/riddhisw/anaconda2/condabin:/home/riddhisw/bin:/home/riddhisw/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin: No such file or directory

jupyter and notebook are both installed and this has been confirmed by conda search:

riddhisw@riddhisw-Oryx-Pro:~$ conda search jupyter
Loading channels: done
# Name                       Version           Build  Channel             
jupyter                        1.0.0          py27_4  pkgs/main           
jupyter                        1.0.0          py27_6  pkgs/main           
jupyter                        1.0.0          py27_7  pkgs/main           
jupyter                        1.0.0  py27h505fd4b_0  pkgs/main           
jupyter                        1.0.0          py35_4  pkgs/main           
jupyter                        1.0.0          py35_6  pkgs/main           
jupyter                        1.0.0          py35_7  pkgs/main           
jupyter                        1.0.0  py35hd38625c_0  pkgs/main           
jupyter                        1.0.0          py36_4  pkgs/main           
jupyter                        1.0.0          py36_6  pkgs/main           
jupyter                        1.0.0          py36_7  pkgs/main           
jupyter                        1.0.0  py36h9896ce5_0  pkgs/main           
jupyter                        1.0.0          py37_4  pkgs/main           
jupyter                        1.0.0          py37_5  pkgs/main           
jupyter                        1.0.0          py37_6  pkgs/main           
jupyter                        1.0.0          py37_7  pkgs/main           
riddhisw@riddhisw-Oryx-Pro:~$ conda search notebook
Loading channels: done
# Name                       Version           Build  Channel             
notebook                       5.0.0  py27h3661c2b_2  pkgs/main           
notebook                       5.0.0  py35h65c930e_2  pkgs/main           
notebook                       5.0.0  py36h0b20546_2  pkgs/main           
notebook                       5.1.0  py27hd3eeb0d_0  pkgs/main           
notebook                       5.1.0  py35ha1dae67_0  pkgs/main           
notebook                       5.1.0  py36h2e4799b_0  pkgs/main           
notebook                       5.2.0  py27h7e51e94_0  pkgs/main           
notebook                       5.2.0  py35h8f773aa_0  pkgs/main           
notebook                       5.2.0  py36h840ffc4_0  pkgs/main           
notebook                       5.2.1  py27h4055434_0  pkgs/main           
notebook                       5.2.1  py35h35fdc29_0  pkgs/main           
notebook                       5.2.1  py36h690a4eb_0  pkgs/main           
notebook                       5.2.2  py27h6748267_0  pkgs/main           
notebook                       5.2.2  py35he644770_0  pkgs/main           
notebook                       5.2.2  py36h40a37e6_0  pkgs/main           
notebook                       5.3.1          py27_0  pkgs/main           
notebook                       5.3.1          py27_1  pkgs/main           
notebook                       5.3.1          py27_2  pkgs/main           
notebook                       5.3.1          py27_3  pkgs/main           
notebook                       5.3.1          py35_0  pkgs/main           
notebook                       5.3.1          py35_1  pkgs/main           
notebook                       5.3.1          py35_2  pkgs/main           
notebook                       5.3.1          py35_3  pkgs/main           
notebook                       5.3.1          py36_0  pkgs/main           
notebook                       5.3.1          py36_1  pkgs/main           
notebook                       5.3.1          py36_2  pkgs/main           
notebook                       5.3.1          py36_3  pkgs/main           
notebook                       5.4.0          py27_0  pkgs/main           
notebook                       5.4.0          py35_0  pkgs/main           
notebook                       5.4.0          py36_0  pkgs/main           
notebook                       5.4.1          py27_0  pkgs/main           
notebook                       5.4.1          py35_0  pkgs/main           
notebook                       5.4.1          py36_0  pkgs/main           
notebook                       5.5.0          py27_0  pkgs/main           
notebook                       5.5.0          py35_0  pkgs/main           
notebook                       5.5.0          py36_0  pkgs/main           
notebook                       5.5.0          py37_0  pkgs/main           
notebook                       5.6.0          py27_0  pkgs/main           
notebook                       5.6.0          py35_0  pkgs/main           
notebook                       5.6.0          py36_0  pkgs/main           
notebook                       5.6.0          py37_0  pkgs/main           
notebook                       5.7.0          py27_0  pkgs/main           
notebook                       5.7.0          py36_0  pkgs/main           
notebook                       5.7.0          py37_0  pkgs/main           
notebook                       5.7.1          py27_0  pkgs/main           
notebook                       5.7.1          py36_0  pkgs/main           
notebook                       5.7.1          py37_0  pkgs/main           
notebook                       5.7.2          py27_0  pkgs/main           
notebook                       5.7.2          py36_0  pkgs/main           
notebook                       5.7.2          py37_0  pkgs/main           
notebook                       5.7.4          py27_0  pkgs/main           
notebook                       5.7.4          py36_0  pkgs/main           
notebook                       5.7.4          py37_0  pkgs/main           
notebook                       5.7.6          py27_0  pkgs/main           
notebook                       5.7.6          py36_0  pkgs/main           
notebook                       5.7.6          py37_0  pkgs/main           
notebook                       5.7.7          py27_0  pkgs/main           
notebook                       5.7.7          py36_0  pkgs/main           
notebook                       5.7.7          py37_0  pkgs/main           
notebook                       5.7.8          py27_0  pkgs/main           
notebook                       5.7.8          py36_0  pkgs/main           
notebook                       5.7.8          py37_0  pkgs/main           
notebook                       6.0.0          py36_0  pkgs/main           
notebook                       6.0.0          py37_0  pkgs/main           
notebook                       6.0.1          py36_0  pkgs/main          

I am hence not sure why a rise installation in a new conda environment would break jupyter in the base conda environment.

damianavila commented 4 years ago

I am hence not sure why a rise installation in a new conda environment would break jupyter in the base conda environment.

That's really weird, we don't do anything to modified the base environment... unless you specifically install RISE on the base env.

ModuleNotFoundError: No module named 'jupyter_core'

Did you try installing jupyter_core in the base environment?