<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><meta http-equiv="content-type" content="text/html; charset=utf-8"><div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Both of these python ports stopped working recently (I’m running Sonoma on a 15” 2021 MacBook Pro). For jupyter-lab, the error I get when I try to run it is:<div><br></div><div><div>raceback (most recent call last):</div><div>  File "/opt/local/bin/jupyter-lab-3.11", line 33, in <module></div><div>    sys.exit(load_entry_point('jupyterlab==3.0.13', 'console_scripts', 'jupyter-lab')())</div><div>             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</div><div>  File "/opt/local/bin/jupyter-lab-3.11", line 25, in importlib_load_entry_point</div><div>    return next(matches).load()</div><div>           ^^^^^^^^^^^^^^^^^^^^</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/metadata/__init__.py", line 202, in load</div><div>    module = import_module(match.group('module'))</div><div>             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_module</div><div>    return _bootstrap._gcd_import(name[level:], package, level)</div><div>           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</div><div>  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import</div><div>  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load</div><div>  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked</div><div>  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed</div><div>  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import</div><div>  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load</div><div>  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked</div><div>  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked</div><div>  File "<frozen importlib._bootstrap_external>", line 940, in exec_module</div><div>  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyterlab/__init__.py", line 7, in <module></div><div>    from .labapp import LabApp</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyterlab/labapp.py", line 15, in <module></div><div>    from jupyterlab_server import slugify, WORKSPACE_EXTENSION</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyterlab_server/__init__.py", line 4, in <module></div><div>    from .app import LabServerApp</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyterlab_server/app.py", line 7, in <module></div><div>    from jupyter_server.extension.application import ExtensionApp, ExtensionAppJinjaMixin</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyter_server/extension/application.py", line 21, in <module></div><div>    from jupyter_server.serverapp import ServerApp</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyter_server/serverapp.py", line 75, in <module></div><div>    from jupyter_server.services.contents.filemanager import AsyncFileContentsManager, FileContentsManager</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyter_server/services/contents/filemanager.py", line 15, in <module></div><div>    from anyio import run_sync_in_worker_thread</div><div>ImportError: cannot import name 'run_sync_in_worker_thread' from 'anyio' (/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/anyio/__init__.py)</div><div><br></div><div>For jupyter.notebook, the error is the following:</div><div><br></div><div><div>Traceback (most recent call last):</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/notebook/traittypes.py", line 235, in _resolve_classes</div><div>    klass = self._resolve_string(klass)</div><div>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/traitlets/traitlets.py", line 2015, in _resolve_string</div><div>    return import_item(string)</div><div>           ^^^^^^^^^^^^^^^^^^^</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/traitlets/utils/importstring.py", line 33, in import_item</div><div>    module = __import__(package, fromlist=[obj])</div><div>             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</div><div>ModuleNotFoundError: No module named 'jupyter_server.contents'</div><div><br></div><div>During handling of the above exception, another exception occurred:</div><div><br></div><div>Traceback (most recent call last):</div><div>  File "/opt/local/bin/jupyter-notebook", line 8, in <module></div><div>    sys.exit(main())</div><div>             ^^^^^^</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyter_core/application.py", line 277, in launch_instance</div><div>    return super().launch_instance(argv=argv, **kwargs)</div><div>           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/traitlets/config/application.py", line 1073, in launch_instance</div><div>    app = cls.instance(**kwargs)</div><div>          ^^^^^^^^^^^^^^^^^^^^^^</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/traitlets/config/configurable.py", line 583, in instance</div><div>    inst = cls(*args, **kwargs)</div><div>           ^^^^^^^^^^^^^^^^^^^^</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/traitlets/traitlets.py", line 1292, in __new__</div><div>    inst.setup_instance(*args, **kwargs)</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/traitlets/traitlets.py", line 1335, in setup_instance</div><div>    super(HasTraits, self).setup_instance(*args, **kwargs)</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/traitlets/traitlets.py", line 1311, in setup_instance</div><div>    init(self)</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/notebook/traittypes.py", line 226, in instance_init</div><div>    self._resolve_classes()</div><div>  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/notebook/traittypes.py", line 238, in _resolve_classes</div><div>    warn(f"{klass} is not importable. Is it installed?", ImportWarning)</div><div>TypeError: warn() missing 1 required keyword-only argument: 'stacklevel'</div></div><div><br></div><div>I suspect that the problem comes from deleting some dependency of both ports running port reclaim, but I am not sure. Should I just uninstall and the install both ports, or is there a better solution?</div><div><br></div><div>Thanks in advance,</div><div><br><div>
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">Artemio Gonzalez Lopez<br>artemiog@mac.com</div>

</div>
<br></div></div></div><br><br><div>
<div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">Artemio Gonzalez Lopez<br>artemiog@mac.com</div>

</div>
<br></body></html>