Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing conda environment #28

Closed
oyvfoss opened this issue Sep 25, 2023 · 2 comments
Closed

Failing conda environment #28

oyvfoss opened this issue Sep 25, 2023 · 2 comments

Comments

@oyvfoss
Copy link
Contributor

oyvfoss commented Sep 25, 2023

(Awesome project! Hoping to contribute here in the future).

Creating a conda/mamba environment from environment.yml, I run into an error:

The issue seems to arise when installing jupyter_contrib_nbextensions.

-> Returns a long string of warnings/errors involving "No module named 'notebook.nbextensions", and stops the installation.

It seems that jupyter_contrib_nbextensions is incompatible with the most recent version of Jupyter notebook
(e.g. ipython-contrib/jupyter_contrib_nbextensions#1650).

Two possible solutions occur to me:

  1. Remove jupyter_contrib_nbextensions or replace with alternatives.
  2. Force an older version of jupyter notebook.
  • Installing notebook=6 before jupyter_contrib_nbextensions gets me a bit further, but still returns in an error.

It seems possible that jupyter_contrib_nbextensions is near- or semi-abandoned (ipython-contrib/jupyter_contrib_nbextensions#1640), so my preference is option 1. However, it is not clear to me what jupyter_contrib_nbextensions is used for exactly -perhaps it isn't viable.

Happy to work on a PR if you agree..

Output when installing the environment
 File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_contrib_core/notebook_compat/nbextensions.py", line 6, in <module>
    from notebook.extensions import BaseExtensionApp
ModuleNotFoundError: No module named 'notebook.extensions'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_contrib_core/notebook_compat/nbextensions.py", line 10, in <module>
    from notebook.nbextensions import BaseNBExtensionApp
ModuleNotFoundError: No module named 'notebook.nbextensions'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_contrib_core/notebook_compat/nbextensions.py", line 12, in <module>
    from ._compat.nbextensions import BaseNBExtensionApp
  File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_contrib_core/notebook_compat/_compat/nbextensions.py", line 35, in <module>
    from notebook.nbextensions import (
ModuleNotFoundError: No module named 'notebook.nbextensions'

| Traceback (most recent call last):
  File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_contrib_core/notebook_compat/nbextensions.py", line 6, in <module>
    from notebook.extensions import BaseExtensionApp
ModuleNotFoundError: No module named 'notebook.extensions'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_contrib_core/notebook_compat/nbextensions.py", line 10, in <module>
    from notebook.nbextensions import BaseNBExtensionApp
ModuleNotFoundError: No module named 'notebook.nbextensions'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_contrib_core/notebook_compat/nbextensions.py", line 12, in <module>
    from ._compat.nbextensions import BaseNBExtensionApp
  File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_contrib_core/notebook_compat/_compat/nbextensions.py", line 35, in <module>
    from notebook.nbextensions import (
ModuleNotFoundError: No module named 'notebook.nbextensions'

\ Traceback (most recent call last):
  File "[userpath]mambaforge/envs/ctdproc/bin/jupyter-nbextensions_configurator", line 6, in <module>
    from jupyter_nbextensions_configurator.application import main
  File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_nbextensions_configurator/__init__.py", line 17, in <module>
    from notebook import version_info as nb_version_info
ImportError: cannot import name 'version_info' from 'notebook' ([userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/notebook/__init__.py)

- Traceback (most recent call last):
  File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_contrib_core/notebook_compat/nbextensions.py", line 6, in <module>
    from notebook.extensions import BaseExtensionApp
ModuleNotFoundError: No module named 'notebook.extensions'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_contrib_core/notebook_compat/nbextensions.py", line 10, in <module>
    from notebook.nbextensions import BaseNBExtensionApp
ModuleNotFoundError: No module named 'notebook.nbextensions'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "[userpath]mambaforge/envs/ctdproc/bin/jupyter-contrib-nbextension", line 6, in <module>
    from jupyter_contrib_nbextensions.application import main
  File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_contrib_nbextensions/application.py", line 7, in <module>
    from jupyter_contrib_core.notebook_compat.nbextensions import ArgumentConflict
  File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_contrib_core/notebook_compat/nbextensions.py", line 12, in <module>
    from ._compat.nbextensions import BaseNBExtensionApp
  File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_contrib_core/notebook_compat/_compat/nbextensions.py", line 35, in <module>
    from notebook.nbextensions import (
ModuleNotFoundError: No module named 'notebook.nbextensions'

done
ERROR conda.core.link:_execute(740): An error occurred while installing package 'conda-forge::jupyter_highlight_selected_word-0.2.0-py38h578d9bd_1005'.
Rolling back transaction: done
post-link script failed for package conda-forge::jupyter_highlight_selected_word-0.2.0-py38h578d9bd_1005
location of failed script: [userpath]mambaforge/envs/ctdproc/bin/.jupyter_highlight_selected_word-post-link.sh
==> script messages <==
Traceback (most recent call last):
  File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_contrib_core/notebook_compat/nbextensions.py", line 6, in <module>
    from notebook.extensions import BaseExtensionApp
ModuleNotFoundError: No module named 'notebook.extensions'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_contrib_core/notebook_compat/nbextensions.py", line 10, in <module>
    from notebook.nbextensions import BaseNBExtensionApp
ModuleNotFoundError: No module named 'notebook.nbextensions'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_contrib_core/notebook_compat/nbextensions.py", line 12, in <module>
    from ._compat.nbextensions import BaseNBExtensionApp
  File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_contrib_core/notebook_compat/_compat/nbextensions.py", line 35, in <module>
    from notebook.nbextensions import (
ModuleNotFoundError: No module named 'notebook.nbextensions'

==> script output <==
stdout: 
stderr: 
return code: 1

()


LinkError: post-link script failed for package conda-forge::jupyter_highlight_selected_word-0.2.0-py38h578d9bd_1005
location of failed script: [userpath]mambaforge/envs/ctdproc/bin/.jupyter_highlight_selected_word-post-link.sh
==> script messages <==
Traceback (most recent call last):
  File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_contrib_core/notebook_compat/nbextensions.py", line 6, in <module>
    from notebook.extensions import BaseExtensionApp
ModuleNotFoundError: No module named 'notebook.extensions'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_contrib_core/notebook_compat/nbextensions.py", line 10, in <module>
    from notebook.nbextensions import BaseNBExtensionApp
ModuleNotFoundError: No module named 'notebook.nbextensions'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_contrib_core/notebook_compat/nbextensions.py", line 12, in <module>
    from ._compat.nbextensions import BaseNBExtensionApp
  File "[userpath]mambaforge/envs/ctdproc/lib/python3.8/site-packages/jupyter_contrib_core/notebook_compat/_compat/nbextensions.py", line 35, in <module>
    from notebook.nbextensions import (
ModuleNotFoundError: No module named 'notebook.nbextensions'

==> script output <==
stdout: 
stderr: 
return code: 1

()


@gunnarvoet
Copy link
Owner

Hi @oyvlun, thanks so much for your interest in this project!

This was my old environment definition when I started working on the package. As you point out, it is outdated and I think that in fact it should be agnostic of how the user wants to edit code and run jupyter notebooks. I went ahead and updated environment.yml in #33. Let me know if you think this fixes your issue and we can close this.

@oyvfoss
Copy link
Contributor Author

oyvfoss commented Sep 30, 2023

Great! I can now build the environment from the updated environment.yml. Thanks for fixing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants