以一般使用者啟用(launch) anaconda jupyterlab

 jupyterlab 當初在裝的時侯可能有遇到權限問題,簡單處理就是大招直接開下去,用管理者權限裝了,導致後來要啟用 jupyterlab 時要先用管理者權限啟用 anaconda 才能啟用 jupyterlab,如果這時侯用一般使用者啟用時會出現類似: alias 引用時有問題,用 i18n() 替代, ExtentionManager 有問題,請檢查你的 jupyter_notebook_config.py 、 jupyter-labextention-script 之類的問題(如下 error log),即使你用管理者權限啟用 jupyterlab 而你的 jupyter notebook 的密碼也設好了,用密碼也登不進去

 工作環境:
    Windows10
      anaconda3
        jupyterlab

 先移掉 jupyterlab ,如同上述,用管理者權限裝的,先用管理者權限啟用 anaconda 再到 jupyterlab 的齒輪 remove application 

 重新安裝 jupyterlab ,打開 anaconda prompt (非管理者權限)

conda install -c conda-forge jupyterlab

 然後就會出現:

EnvironmentNotWritableError: The current user does not have write permissions to the target environment.
environment location: C:\ProgramData\Anaconda3

不管 location 是那裏,把你的使用者權限加上去,如果沒有資料夾就開下去

裝好之後再回 anaconda (不使用管理者權限啟用),此時開啟 jupyterlab 就可以啟用了

 

 

收工!

# lanuch jupyterlab with general user privelege within anaconda


====================== error log

C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\nbclassic\notebookapp.py:73: FutureWarning: The alias `_()` will be deprecated. Use `_i18n()` instead.
_("Don't open the notebook in a browser after startup.")
C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\nbclassic\notebookapp.py:89: FutureWarning: The alias `_()` will be deprecated. Use `_i18n()` instead.
_("Allow the notebook to be run from root user.")
C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\nbclassic\traits.py:20: FutureWarning: The alias `_()` will be deprecated. Use `_i18n()` instead.
help=_('Deprecated: Use minified JS file or not, mainly use during dev to avoid JS recompilation'),
C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\nbclassic\traits.py:25: FutureWarning: The alias `_()` will be deprecated. Use `_i18n()` instead.
help=_("Supply extra arguments that will be passed to Jinja environment."))
C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\nbclassic\traits.py:29: FutureWarning: The alias `_()` will be deprecated. Use `_i18n()` instead.
help=_("Extra variables to supply to jinja templates when rendering."),
C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\nbclassic\traits.py:62: FutureWarning: The alias `_()` will be deprecated. Use `_i18n()` instead.
help=_("""Path to search for custom.js, css""")
C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\nbclassic\traits.py:74: FutureWarning: The alias `_()` will be deprecated. Use `_i18n()` instead.
help=_("""Extra paths to search for serving jinja templates.
C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\nbclassic\traits.py:85: FutureWarning: The alias `_()` will be deprecated. Use `_i18n()` instead.
help=_("""extra paths to look for Javascript notebook extensions""")
C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\nbclassic\traits.py:130: FutureWarning: The alias `_()` will be deprecated. Use `_i18n()` instead.
help=_("""The MathJax.js configuration file that is to be used.""")
C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\nbclassic\traits.py:143: FutureWarning: The alias `_()` will be deprecated. Use `_i18n()` instead.
help=(_("Dict of Python modules to load as notebook server extensions."
C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\nbclassic\notebookapp.py:122: FutureWarning: The alias `_()` will be deprecated. Use `_i18n()` instead.
description = _("""The Jupyter HTML Notebook.
C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\nbclassic\notebookapp.py:143: FutureWarning: The alias `_()` will be deprecated. Use `_i18n()` instead.
help=_("""Path to search for custom.js, css""")
C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\nbclassic\notebookapp.py:155: FutureWarning: The alias `_()` will be deprecated. Use `_i18n()` instead.
help=_("""extra paths to look for Javascript notebook extensions""")
[I 2022-02-15 11:30:43.422 ServerApp] jupyterlab | extension was successfully linked.
[E 2022-02-15 11:30:43.432 NotebookApp] Exception while loading config file C:\Users\登入的使用者\.jupyter\jupyter_notebook_config.py
Traceback (most recent call last):
File "C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\traitlets\config\application.py", line 738, in _load_config_files
config = loader.load_config()
File "C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\traitlets\config\loader.py", line 614, in load_config
self._read_file_as_dict()
File "C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\traitlets\config\loader.py", line 646, in _read_file_as_dict
exec(compile(f.read(), conf_filename, 'exec'), namespace, namespace)
File "C:\Users\登入的使用者\.jupyter\jupyter_notebook_config.py", line 28
c.JupyterApp.config_file = 'C:\Users\登入的使用者\.jupyter\jupyter_notebook_config.json'
^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
[W 2022-02-15 11:30:43.432 NotebookApp] 'password' 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-02-15 11:30:43.737 ServerApp] 'ExtensionManager' object has no attribute '_extensions'
Traceback (most recent call last):
File "C:\Users\登入的使用者\.conda\envs\mito\Scripts\jupyter-lab-script.py", line 9, in
sys.exit(main())
File "C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\jupyter_server\extension\application.py", line 567, in launch_instance
serverapp = cls.initialize_server(argv=args)
File "C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\jupyter_server\extension\application.py", line 537, in initialize_server
serverapp.initialize(
File "C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\traitlets\config\application.py", line 88, in inner
return method(app, *args, **kwargs)
File "C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\jupyter_server\serverapp.py", line 2341, in initialize
point = self.extension_manager.extension_points[starter_extension]
File "C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\jupyter_server\extension\manager.py", line 303, in extension_points
for value in self.extensions.values()
File "C:\Users\登入的使用者\.conda\envs\mito\lib\site-packages\nbclassic\nbserver.py", line 80, in extensions
nb = self._extensions.get("nbclassic")
AttributeError: 'ExtensionManager' object has no attribute '_extensions'


=================== 後記

安裝 Jupyter Notebook (default)

conda install -c conda-forge notebook
conda install -c conda-forge nb_conda_kernels

安裝 Jupyter Lab

conda install -c conda-forge jupyterlab
conda install -c conda-forge nb_conda_kernels

安裝 Jupyter Notebook extensions

conda install -c conda-forge jupyter_contrib_nbextensions







留言

這個網誌中的熱門文章

使用 Excel 計算2個地點之間的直線距離

LINE 儲存的檔案傳到 email 不方便 很不方便 非常不方便 但是有解的筆記

Excel 巨集合併多個 Excel 檔案