jupyter-widgets / tutorial

A tutorial for widgets
BSD 3-Clause "New" or "Revised" License
394 stars 164 forks source link

Problem while trying to build an environment using the `environment.yml` file #130

Closed marimeireles closed 3 years ago

marimeireles commented 3 years ago

On my ubuntu 20 when I conda env create -f environment.yml && conda activate widgets-tutorial-2021 and try to run jupyter lab I get the following:

/home/mariana/miniconda3/envs/tutorial/lib/python3.8/site-packages/jupyter_server/transutils.py:13: FutureWarning: The alias `_()` will be deprecated. Use `_i18n()` instead.
  warnings.warn(warn_msg, FutureWarning)
[I 2021-06-21 13:39:53.511 ServerApp] jupyterlab | extension was successfully linked.
[W 2021-06-21 13:39:53.636 ServerApp] 'ExtensionManager' object has no attribute '_extensions'
Traceback (most recent call last):
  File "/home/mariana/miniconda3/envs/tutorial/bin/jupyter-lab", line 10, in <module>
    sys.exit(main())
  File "/home/mariana/miniconda3/envs/tutorial/lib/python3.8/site-packages/jupyter_server/extension/application.py", line 518, in launch_instance
    serverapp = cls.initialize_server(argv=args)
  File "/home/mariana/miniconda3/envs/tutorial/lib/python3.8/site-packages/jupyter_server/extension/application.py", line 488, in initialize_server
    serverapp.initialize(
  File "/home/mariana/.local/lib/python3.8/site-packages/traitlets/config/application.py", line 87, in inner
    return method(app, *args, **kwargs)
  File "/home/mariana/miniconda3/envs/tutorial/lib/python3.8/site-packages/jupyter_server/serverapp.py", line 1872, in initialize
    self.init_server_extensions()
  File "/home/mariana/miniconda3/envs/tutorial/lib/python3.8/site-packages/jupyter_server/serverapp.py", line 1698, in init_server_extensions
    self.extension_manager.link_all_extensions(self)
  File "/home/mariana/miniconda3/envs/tutorial/lib/python3.8/site-packages/jupyter_server/extension/manager.py", line 359, in link_all_extensions
    self.link_extension(name, serverapp)
  File "/home/mariana/miniconda3/envs/tutorial/lib/python3.8/site-packages/jupyter_server/extension/manager.py", line 332, in link_extension
    extension = self.extensions[name]
  File "/home/mariana/.local/lib/python3.8/site-packages/nbclassic/nbserver.py", line 80, in extensions
    nb = self._extensions.get("nbclassic")
AttributeError: 'ExtensionManager' object has no attribute '_extensions'

I wonder if it's interacting with my pip packages smh. I tried with both mamba and conda and they're both not working.

Also, all seems good when I run the check script:

(tutorial) mariana@wintermute ~/dev/tutorial (master*?) $ python install_check.py
Checking requirements for Jupyter widget ecosystem........../home/mariana/miniconda3/envs/tutorial/lib/python3.8/site-packages/jupyter_server/transutils.py:13: FutureWarning: The alias `_()` will be deprecated. Use `_i18n()` instead.
  warnings.warn(warn_msg, FutureWarning)
.
    πŸŽ‰ All required packages installed
Checking voila version:
0.2.10
    πŸŽ‰ Voila is correctly installed
Checking version numbers of these packages:  ipywidgets, jupyterlab
    πŸŽ‰ ipywidgets version is good!
    πŸŽ‰ jupyterlab version is good!
Checking whether kernel widgets-tutorial exists
    πŸŽ‰ Custom kernel is correctly installed
Checking whether all Jupyter lab extensions are installed
    πŸŽ‰ All extensions are installed!
marimeireles commented 3 years ago

edit: the first output

marimeireles commented 3 years ago

Okay thanks to Krassowski everywhere in the internet I was able to fix the issue with:

conda install -c conda-forge nbclassic=0.2.8   # in May 2021
conda update nbclassic

So, we leave it documented here in case other people have the same problem :)

mwcraig commented 3 years ago

Thanks!