Open paugier opened 4 years ago
Could you provide the output of:
which jupyter
and
which python
Are you in a conda
environment?
jupyter
, jupyter-lab
and python
all in /home/marianne/miniconda3/bin.
I'm going to try in a conda environment.
Did you make sure to clear the browser cache? By restarting the browser or hard refreshing
Ah it works in an virtual environment...
I'm trying to compare the conda packages installed in base and in the virtual env, but there are of course many packages and it's not evident.
Python 3.7 for base and Python 3.8 for the venv. Same versions for all jupyter* packages...
Nodejs 11.14 for base and 13.7 in the venv...
I am not sure what is going wrong here... But I would suggest uninstalling everything from the base now, in order to reduce the chances to get conflicts between environments.
Hum, strange: ipympl=0.2.1 in base and ipympl=0.4.1=py_0 in venv !
After conda update -c conda-forge ipympl nodejs
, it works!
I thought conda install
updates the packages and it did not update them in this case.
It is also a mystery why I have such old packages in base (miniconda installed today). I may have done conda install matplotlib
before conda config --add channels conda-forge
, but it should not affect ipympl version (?)
Anyway, it is easy to get stuck in this problem...
From conda install -h
:
Conda attempts to install the newest versions of the requested packages. To
accomplish this, it may update some packages that are already installed, or
install additional packages.
Then it explains why it did not work. jupyter labextension install jupyter-matplotlib
will install the latest labextension available online, which is not compatible with ipympl 0.2.1...
We might want to update the README telling people to be careful about the labextension version.
I still don't understand why conda install -c conda-forge ipympl nodejs
didn't not "install the newest versions of the requested packages".
I'm having a similar problem. When running the example I just get
Loading widget...
I'm in a conda environment (output of conda list
below), and which python/jupyter/jupyter-lab
all point to that conda environment. I've also tried closing and reopening the browser to clear the cache.
Any other ideas?
I also got the same Loading widget...
error and later on when trying to fix it I also got the Widget loads, returns Error displaying widget: model not found
error (see #154).
However, I solved both errors by enforcing the conda package version ipympl=0.5.6
which is compatible with Jupyterlab version 2. The problem was that Conda by default would version install ipympl version 0.3.3, which is not compatible with Jupyterlab version 2.
So to sum up, I got these version to work:
conda install jupyterlab=2.1.5 ipympl==0.5.6 # NOTE: ipympl installes "jupyter-matplotlib v0.7.2"
Such that which notebook code works:
%matplotlib widget
import matplotlib.pyplot as plt
import numpy as np
# Testing matplotlib interactions with a simple plot
fig = plt.figure()
plt.plot(np.sin(np.linspace(0, 20, 100)))
@PeterFogh, what OS are you running? Here on Windows 10, I just tried conda create -n test jupyterlab ipympl
, and get ipympl conda-forge/noarch::ipympl-0.5.6-pyh9f0ad1d_1
among the long list of packages to be installed, i.e. version 0.5.6, not 0.3.3.
jupyterlab is version 2.1.5.
Hi @thomasaarholt, Unix, more specific:
> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
Yah, I should say that I installed more Conda packages then first stated, as it is probably some of their dependencies which makes Conda downgrade the ipymlp version. I tried to install all these packages, which works:
conda create -n py37_jupyterlab_v2.1.5 python=3.7 jupyterlab nb_conda_kernels nodejs nbresuse flake8 jupyterlab_code_formatter black ipympl==0.5.6 nbdime dask-labextension jupyterlab-git pandas holoviews
And for setting up the JupyterLab extensions:
conda activate py37_jupyterlab_v2.1.5; jupyter labextension install @ijmbarr/jupyterlab_spellchecker@0.1.6 @jupyter-widgets/jupyterlab-manager@2.0.0 @jupyterlab/geojson-extension@2.0.1 @jupyterlab/git@0.20.0 @jupyterlab/github@2.0.0 @jupyterlab/shortcutui@0.5.0-beta.2 @jupyterlab/toc@4.0.0 @krassowski/jupyterlab_go_to_definition@1.0.0 @pyviz/jupyterlab_pyviz@1.0.4 @ryantam626/jupyterlab_code_formatter@1.3.1 dask-labextension@2.0.2 jupyterlab-flake8@0.6.1 jupyterlab-python-file@0.4.0 nbdime-jupyterlab@2.0.0 --no-build; jupyter lab build; jupyter serverextension enable --py jupyterlab_code_formatter; jupyter serverextension enable dask_labextension
Fresh install with conda (laptop with Ubuntu 18.04 => nothing to do with Docker).
Maybe related to #161 ?
Matplotlib figures do not show up and I get only
Standard installation with conda:
Note that ipywidgets seems to work fine.
from ipywidgets import Button; Button(description='test')
gives a button.