Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#65274 closed defect (fixed)

jupyter notebook fails to tart

Reported by: dershow Owned by: reneeotten (Renee Otten)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: stromnov (Andrey Stromnov)
Port: py-nbformat

Description

I upgraded both:

py39-jupyter_client from 7.1.2_0 to 7.3.1_0 py39-jupyter_core from 4.7.1_0 to 4.10.0_0

Now if I try to run Jupyter notebook it fails::

 % jupyter-3.9 notebook
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/bin/jupyter-notebook", line 33, in <module>
    sys.exit(load_entry_point('notebook==6.3.0', 'console_scripts', 'jupyter-notebook')())
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/bin/jupyter-notebook", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/metadata.py", line 86, in load
    module = import_module(match.group('module'))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notebook/notebookapp.py", line 80, in <module>
    from .services.contents.manager import ContentsManager
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/notebook/services/contents/manager.py", line 17, in <module>
    from nbformat import sign, validate as validate_nb, ValidationError
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/nbformat/__init__.py", line 11, in <module>
    from . import v1, v2, v3, v4
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/nbformat/v4/__init__.py", line 39, in <module>
    from .convert import downgrade, upgrade
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/nbformat/v4/convert.py", line 13, in <module>
    from .. import validator
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/nbformat/validator.py", line 13, in <module>
    from .json_compat import ValidationError, _validator_for_name, get_current_validator
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/nbformat/json_compat.py", line 10, in <module>
    import fastjsonschema
ModuleNotFoundError: No module named 'fastjsonschema'

I don't see a port for fastjsonschema so I'm not sure how to fix this.

Change History (8)

comment:1 Changed 2 years ago by reneeotten (Renee Otten)

Owner: set to reneeotten
Port: py-nbformat added; py39-jupyter_core removed
Priority: HighNormal
Status: newassigned

sorry, that must have been my doing when I updated some ports yesterday... As you can see the actual problem is because of py-nbformat; it indeed has a new dependency which I failed to add. Stay tuned!

comment:2 Changed 2 years ago by reneeotten (Renee Otten)

Resolution: fixed
Status: assignedclosed

In 1541b48b5c6d7ff2c2f15c570ee8f2a0588df03a/macports-ports (master):

py-nbformat: fix dependencies

Closes: #65274

comment:3 Changed 2 years ago by dershow

Thank you. As a temporary work around I did this:

pip install --user fastjsonschema

I realized that this is not the macport recommended way, but it does allow me to use notebook temporary, until your fix propagates through. (I don't yet see anything outdated if I do: sudo port sync; port outdated.)

comment:4 Changed 2 years ago by dershow

I spoke too soon. My "fix" above allows notebook to start, but it seems that it is not actually starting the python kernel, even for an existing notebook.

comment:5 Changed 2 years ago by dershow

Any suggestions for a temporary fix would be great. Suddenly, not having access to notebook when I'm working on some code is frustrating.

comment:6 Changed 2 years ago by reneeotten (Renee Otten)

you either have to wait until the changes are propagated to the servers (just do a selfupdate again and you might get it; typically it should be within the hour or so.

Alternatively, you can use a local repository and sync with GitHub to be up-to-date whenever you "fetch" from the macports-ports repository.

comment:7 Changed 2 years ago by reneeotten (Renee Otten)

okay, I think the problem you're seeing now has to do with py-ipykernel it appears the kernel.json file doesn't get installed anymore (that cannot be my doing as I wasn't the last one to make functional changes to it ;).

Let me take a look...

comment:8 Changed 2 years ago by dershow

I updated and now it seems to be working fine. So you did manage to fix it.

Thanks,

Note: See TracTickets for help on using tickets.