相关:jupyter-lab does not load jupyter_nbextensions_configurator (but jupyter-notebook does)
这一次,我没有要求安装任何jupyter笔记本的东西--还有什么东西把它拖进来了吗?
jupyter实验室启动的完整控制台输出如下
发行
我想:(1)解决现有的问题;( b)防止它们再次发生
我尝试删除/禁用对jupyter_nbextensions_configurator的引用,但没有结果:我想我还没有找到(全部?)正确的地方。
背景
在使用Conda创建了基本环境之后,我只使用pip (除了从Conda安装nVidia数据自动化系统),并且我的pip安装在环境中:
pip install -q --upgrade pip setuptools pip-autoremove
pip install --no-input numpy==1.23.* numba matplotlib cupy-cuda112 pandas pandoc plotly scipy seaborn statistics tabulate line_profiler
pip install --no-input tensorflow==2.9.1 tensorflow-probability tensorflow-addons tensorflow_datasets tensorflow-text==2.9.0
pip install --no-input pywebcopy bs4 PySimpleGUI display_xml gtts playsound
pip install --no-input jupyterlab ipyfilechooser tqdm wget
pip install -q jupyterlab-lsp python-lsp-server[all]
当我开始做jupyter实验室时,我得到了这样的信息:
控制台输出
(PYTFCurrent) c:\Users\Julian>jupyter lab
[I 2022-11-10 15:31:48.320 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2022-11-10 15:31:48.335 ServerApp] jupyterlab | extension was successfully linked.
[W 2022-11-10 15:31:48.341 NotebookApp] 'notebook_dir' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2022-11-10 15:31:48.341 NotebookApp] 'password_required' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2022-11-10 15:31:48.341 NotebookApp] 'token' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2022-11-10 15:31:48.348 ServerApp] notebook_dir is deprecated, use root_dir
[I 2022-11-10 15:31:48.348 ServerApp] nbclassic | extension was successfully linked.
[W 2022-11-10 15:31:48.756 ServerApp] jupyter_nbextensions_configurator | error adding extension (enabled: True): The module 'jupyter_nbextensions_configurator' could not be found (No module named 'jupyter_nbextensions_configurator'). Are you sure the extension is installed?
Traceback (most recent call last):
File "C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\site-packages\jupyter_server\extension\manager.py", line 175, in _validate_name
self._module, self._metadata = get_metadata(name)
File "C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\site-packages\jupyter_server\extension\utils.py", line 55, in get_metadata
module = importlib.import_module(package_name)
File "C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'jupyter_nbextensions_configurator'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\site-packages\jupyter_server\extension\manager.py", line 320, in add_extension
extpkg = ExtensionPackage(name=extension_name, enabled=enabled)
File "C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\site-packages\jupyter_server\extension\manager.py", line 166, in __init__
super().__init__(*args, **kwargs)
File "C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\site-packages\traitlets\traitlets.py", line 1232, in __init__ with self.hold_trait_notifications():
File "C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\contextlib.py", line 142, in __exit__
next(self.gen)
File "C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\site-packages\traitlets\traitlets.py", line 1348, in hold_trait_notifications
value = trait._cross_validate(self, getattr(self, name))
File "C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\site-packages\traitlets\traitlets.py", line 729, in _cross_validate
value = obj._trait_validators[self.name](obj, proposal)
File "C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\site-packages\traitlets\traitlets.py", line 1132, in __call__ return self.func(*args, **kwargs)
File "C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\site-packages\jupyter_server\extension\manager.py", line 177, in _validate_name
raise ExtensionModuleNotFound(
jupyter_server.extension.utils.ExtensionModuleNotFound: The module 'jupyter_nbextensions_configurator' could not be found (No module named 'jupyter_nbextensions_configurator'). Are you sure the extension is installed?
[I 2022-11-10 15:31:48.759 ServerApp] notebook_shim | extension was successfully linked.
[W 2022-11-10 15:31:48.799 ServerApp] All authentication is disabled. Anyone who can connect to this server will be able to run code.
[I 2022-11-10 15:31:48.805 ServerApp] notebook_shim | extension was successfully loaded.
[I 2022-11-10 15:31:49.280 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server
[W 2022-11-10 15:31:49.892 ServerApp] jupyter_lsp | extension failed loading with message: [WinError 5] Access is denied: 'a:\\My Documents\\.virtual_documents'
[E 2022-11-10 15:31:49.893 ServerApp] jupyter_lsp | stack trace
Traceback (most recent call last):
File "C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\site-packages\jupyter_server\extension\manager.py", line 355, in load_extension
extension.load_all_points(self.serverapp)
File "C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\site-packages\jupyter_server\extension\manager.py", line 229, in load_all_points
return [self.load_point(point_name, serverapp) for point_name in self.extension_points]
File "C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\site-packages\jupyter_server\extension\manager.py", line 229, in <listcomp>
return [self.load_point(point_name, serverapp) for point_name in self.extension_points]
File "C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\site-packages\jupyter_server\extension\manager.py", line 222, in load_point
return point.load(serverapp)
File "C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\site-packages\jupyter_server\extension\manager.py", line 148, in load
return loader(serverapp)
File "C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\site-packages\jupyter_lsp\serverextension.py", line 50, in load_jupyter_server_extension
setup_shadow_filesystem(virtual_documents_uri=virtual_documents_uri)
File "C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\site-packages\jupyter_lsp\virtual_documents_shadow.py", line 116, in setup_shadow_filesystem
rmtree(str(shadow_filesystem))
File "C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\shutil.py", line 749, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\shutil.py", line 623, in _rmtree_unsafe
onerror(os.rmdir, path, sys.exc_info())
File "C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\shutil.py", line 621, in _rmtree_unsafe
os.rmdir(path)
PermissionError: [WinError 5] Access is denied: 'a:\\My Documents\\.virtual_documents'
[I 2022-11-10 15:31:49.896 LabApp] JupyterLab extension loaded from C:\Users\Julian\anaconda3\envs\PYTFCurrent\lib\site-packages\jupyterlab
[I 2022-11-10 15:31:49.896 LabApp] JupyterLab application directory is C:\Users\Julian\anaconda3\envs\PYTFCurrent\share\jupyter\lab
[I 2022-11-10 15:31:49.901 ServerApp] jupyterlab | extension was successfully loaded.
[I 2022-11-10 15:31:49.909 ServerApp] nbclassic | extension was successfully loaded.
[I 2022-11-10 15:31:49.910 ServerApp] Serving notebooks from local directory: A:\My Documents
[I 2022-11-10 15:31:49.910 ServerApp] Jupyter Server 1.23.1 is running at:
[I 2022-11-10 15:31:49.910 ServerApp] http://localhost:8888/lab
[I 2022-11-10 15:31:49.910 ServerApp] or http://127.0.0.1:8888/lab
[I 2022-11-10 15:31:49.910 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 2022-11-10 15:31:55.760 LabApp] Build is up to date
安装信息
Python 3.10.6,Windows 10
(PYTFCurrent) c:\Users\Julian>conda list jupyter*
# packages in environment at C:\Users\Julian\anaconda3\envs\PYTFCurrent:
#
# Name Version Build Channel
jupyter-client 7.4.4 pypi_0 pypi
jupyter-core 5.0.0 pypi_0 pypi
jupyter-lsp 1.5.1 pypi_0 pypi
jupyter-server 1.23.1 pypi_0 pypi
jupyterlab 3.5.0 pypi_0 pypi
jupyterlab-lsp 3.10.2 pypi_0 pypi
jupyterlab-pygments 0.2.2 pypi_0 pypi
jupyterlab-server 2.16.2 pypi_0 pypi
jupyterlab-widgets 3.0.3 pypi_0 pypi
PS关于激活的建议“此配置将传递给ServerApp。请务必在我们的下一个版本之前更新您的配置。”也不会不受欢迎。
发布于 2022-11-10 16:49:11
我希望这个答案将被更好的答案所取代,解释为什么会出现这种情况,但是我发现需要编辑的json配置文件实际上位于:
C:\ProgramData\jupyter
(通过在笔记本单元中运行!jupyter server extension list
发现)
在其中可以找到jupyter_notebook_config.json,也可能在nbconfig子文件夹(tree.json、notebook.json)中删除了引用nbextensions_configurator等的行。
我不知道为什么C:\Users\Julian\.jupyter
中有类似的文件,但是编辑它们没有效果。
现在没有配置器错误,jupyer_lsp也正确加载。
https://stackoverflow.com/questions/74392115
复制相似问题