My Jupyter kernel moves between dead, starting, connected status but can’t run any cell. I am running the kernel on the cluster and everything worked fine. I can use ipython from the terminal. A similar thing happens in both Jupyter lab and notebook.
I have reinstalled ipython and tested it with iptest, reinstalled Jupyter also.
pip uninstall ipykernel ipython jupyter_client jupyter_core traitlets ipython_genutils -y
pip install ipykernel ipython jupyter_client jupyter_core traitlets ipython_genutils
Versions:
Jupyter core : 4.5.0
Jupyter-notebook : 5.7.8
Qtconsole : 4.4.3
Ipython : 7.8.0
Ipykernel : 5.1.0
Jupyter client : 5.2.4
Jupyter lab : 1.1.4
Here is the log file when running Jupyter lab.
Related
Spyder notebook doesn't show notebook option
Solved:
pip uninstall ruamel.yaml
pip uninstall spyder-notebook
pip install ruamel.yaml==0.17.21
pip install spyder-notebook==0.4.0
I have installed jupyter notebook in my ubuntu 20.04 device.
These are the versions of the installed libraries:
jupyter core : 4.6.3
jupyter-notebook : 6.1.4
qtconsole : 4.7.7
ipython : 7.19.0
ipykernel : 5.3.4
jupyter client : 6.1.7
jupyter lab : 2.2.6
nbconvert : 6.0.7
ipywidgets : 7.5.1
nbformat : 5.0.8
traitlets : 5.0.5
When I open notebook in the browser I cannot add cells in the notebook because there are no buttons and menus to do so.
When I open a file in the notebook this is what I get.
I have tried reinstalling the libraries and repeating the process , but I cannot fix the issue.
I followed the installation of the xeus-cling (created an env, activated,installed xeus-cling there) and when I want to select the C++14 kernel in a jupyter notebook it only appears Python3. What am I doing wrong?
I had the same problem. Its because jupyter-notebook is not installed in your environment. The jupyter server which is starting is the global one hence you don't see the c++14 option. The solution is:
Create a new directory and git clone the repository.
Run the conda env create -f environmental.yml command in cmd.
Run the conda activate xeus-cling command.
Run the jupyter notebook command.
You should now be able to see the c++14 and c++17 options. Step 2 created the xeus-cling environment and installs all the correct package versions including the correct jupyter notebook version.
Install notebook in your environment.
conda install xeus-cling notebook -c QuantStack -c conda-forge
You need register new kernels in jupyter:
jupyter kernelspec install PREFIX/share/jupyter/xcpp11 --sys-prefix
jupyter kernelspec install PREFIX/share/jupyter/xcpp14 --sys-prefix
jupyter kernelspec install PREFIX/share/jupyter/xcpp17 --sys-prefix
I've installed Ipython 6.0.0 successfully using Pip3:
pip3 install IPython
but when tried to run the command
Ipython
I got this error:
bash: IPython: command not found
This is the pip list result:
ipykernel (5.1.3)
ipython (6.0.0)
ipython-genutils (0.2.0)
..
..
notebook (6.0.2)
and this is the result of pip3 show IPython
Name: ipython
Version: 6.0.0
Summary: IPython: Productive Interactive Computing
Home-page: https://ipython.org
Author: The IPython Development Team
Author-email: ipython-dev#python.org
License: BSD
Location: /home/pi/.local/lib/python3.5/site-packages
Requires: setuptools, traitlets, jedi, pexpect, pygments, pickleshare, simplegeneric, prompt-toolkit, decorator
This is a problem of case sensitivity...
The correct typography is IPython.
pip is not case sensitive, see Is PyPI case sensitive?
IPython is installed as ipython (lowercase), as shown in your pip3 show IPython
bash is case sensitive...
So, just enter ipython.
As you have specified pip3, I would also recommend to invoke ipython3 to avoid python2/3 confusions.
I haven't changed my system configuration, But I'm spotting this error for the first time today.
I've reported it here: https://github.com/jupyter/notebook/issues/4871
> jupyter notebook
[I 10:44:20.102 NotebookApp] JupyterLab extension loaded from /usr/local/anaconda3/lib/python3.7/site-packages/jupyterlab
[I 10:44:20.102 NotebookApp] JupyterLab application directory is /usr/local/anaconda3/share/jupyter/lab
[I 10:44:20.104 NotebookApp] Serving notebooks from local directory: /Users/pi
[I 10:44:20.104 NotebookApp] The Jupyter Notebook is running at:
[I 10:44:20.104 NotebookApp] http://localhost:8888/?token=586797fb9049c0faea24f2583c4de32c08d45c89051fb07d
[I 10:44:20.104 NotebookApp] or http://127.0.0.1:8888/?token=586797fb9049c0faea24f2583c4de32c08d45c89051fb07d
[I 10:44:20.104 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 10:44:20.110 NotebookApp]
To access the notebook, open this file in a browser:
file:///Users/pi/Library/Jupyter/runtime/nbserver-65385-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=586797fb9049c0faea24f2583c4de32c08d45c89051fb07d
or http://127.0.0.1:8888/?token=586797fb9049c0faea24f2583c4de32c08d45c89051fb07d
[E 10:44:21.457 NotebookApp] Could not open static file ''
[W 10:44:21.512 NotebookApp] 404 GET /static/components/react/react-dom.production.min.js (::1) 9.02ms referer=http://localhost:8888/tree?token=BLA
[W 10:44:21.548 NotebookApp] 404 GET /static/components/react/react-dom.production.min.js (::1) 0.99ms referer=http://localhost:8888/tree?token=BLA
Set
Looks like this issue was fixed in Jupyter 6.0.1
So the question becomes: can I force-install jupyter 6.0.1?
As the initial question has now provoked a second question, I now ask this new question here: How to force `conda` to install the latest version of `jupyter`?
Alternatively I can manually provide the missing file, but I'm not sure where. I've asked here: Where does Jupyter install site-packages on macOS?
Research:
https://github.com/jupyter/notebook/pull/4772 "add missing react-dom js to package data #4772" on 6 Aug 2019
minrk added this to the 6.0.1 milestone on 18 Jul
Ok, so can I get Jupyter Notebook 6.0.1?
brew cask install anaconda downloads ~/Library/Caches/Homebrew/downloads/{LONG HEX}--Anaconda3-2019.07-MacOSX-x86_64 which is July, and conda --version reports conda 4.7.10. But this is for Anaconda which is the Package Manager.
> conda list | grep jupy
jupyter 1.0.0 py37_7
jupyter_client 5.3.1 py_0
jupyter_console 6.0.0 py37_0
jupyter_core 4.5.0 py_0
jupyterlab 1.0.2 py37hf63ae98_0
jupyterlab_server 1.0.0 py_0
So that's a bit confusing. No jupyter notebook here.
> which jupyter
/usr/local/anaconda3/bin/jupyter
> jupyter --version
jupyter core : 4.5.0
jupyter-notebook : 6.0.0
qtconsole : 4.5.1
ipython : 7.6.1
ipykernel : 5.1.1
jupyter client : 5.3.1
jupyter lab : 1.0.2
nbconvert : 5.5.0
ipywidgets : 7.5.0
nbformat : 4.4.0
traitlets : 4.3.2
Ok, so it appears jupyter-notebook is in jupyter which is maintained by Anaconda.
Can we update this?
https://jupyter.readthedocs.io/en/latest/projects/upgrade-notebook.html
> conda update jupyter
:
Alas jupyter --version is still 6.0.0
I fixed this by updating both jupyter on pip and pip3 (just to be safe) and this fixed the problem
using both
pip install --upgrade jupyter
and
pip3 install --upgrade jupyter --no-cache-dir
I believe you can do this in the terminal as well as in conda's terminal (since conda envs also have pip)
As per Where does Jupyter install site-packages on macOS?, I locate where on my system jupyter is searching for this missing file:
> find / -path '*/static/components' 2>/dev/null
/usr/local/anaconda3/pkgs/notebook-6.0.0-py37_0/lib/python3.7/site-packages/notebook/static/components
/usr/local/anaconda3/lib/python3.7/site-packages/notebook/static/components
And as per https://github.com/jupyter/notebook/pull/4772#issuecomment-515794823, if I download that file and deposit it in the second location, i.e. creating:
/usr/local/anaconda3/lib/python3.7/site-packages/notebook/static/components/react/react-dom.production.min.js
... now jupyter notebook launches without errors.
(NOTE: Being cautious I have also copied it into the first location. But that doesn't seem to have any effect.)