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

Installed jupyterlab_latex. right click offers preview, but get "Server Extension Error" #108

Open
tomPorter opened this issue Mar 1, 2019 · 6 comments
Labels

Comments

@tomPorter
Copy link

I have installed jupyterlab_latex, using both pip and "jupyter labextension install @jupyterlab/latex"

I can attach build results from the labextension install if needed.

@BrianChevalier
Copy link

What is the specific error? You might not have xelatex installed which is the default latex engine used.

@bagustris
Copy link

Same error here. Pdf appears but error message also appears.
Already set 'pdflatex' manually in jupyter_notebook_config.
This is may be the problem, no line for c.LatexConfig.latex_command=.
I added it manually and this maybe is not read by jupyter_latex.

@sugatoray
Copy link

I have done all things suggested. But still it is NOT working! Keep getting this error on asking to open the preview.

Server Extension Error
You probably do not have jupyterlab_latex installed or enabled. Please, run "pip install -U jupyterlab_latex." If that does not work, try "jupyter serverextension enable --sys-prefix jupyterlab_latex".

@lilcuttlefish
Copy link

Did anyone manage to solve this issue?

@ChasingZenith
Copy link

same here. Some more information from me

I follow the instruction to run pip install -U jupyterlab_latex which succeed.
But when I run jupyter serverextension enable --sys-prefix jupyterlab_latex I get the following error.

Log when `jupyter extention enable --sys-prefix jupyterlab_latex`
jupyter serverextension enable --sys-prefix jupyterlab_latex
Enabling: jupyterlab_latex
- Writing config: /usr/etc/jupyter
Traceback (most recent call last):
  File "/home/user/.local/bin/jupyter-serverextension", line 8, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python3.8/site-packages/jupyter_core/application.py", line 270, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/traitlets/config/application.py", line 845, in launch_instance
    app.start()
  File "/home/user/.local/lib/python3.8/site-packages/notebook/serverextensions.py", line 294, in start
    super(ServerExtensionApp, self).start()
  File "/home/user/.local/lib/python3.8/site-packages/jupyter_core/application.py", line 259, in start
    self.subapp.start()
  File "/home/user/.local/lib/python3.8/site-packages/notebook/serverextensions.py", line 213, in start
    self.toggle_server_extension(arg)
  File "/home/user/.local/lib/python3.8/site-packages/notebook/serverextensions.py", line 184, in toggle_server_extension
    toggle_serverextension_python(
  File "/home/user/.local/lib/python3.8/site-packages/notebook/serverextensions.py", line 74, in toggle_serverextension_python
    cm.update("jupyter_notebook_config", cfg)
  File "/home/user/.local/lib/python3.8/site-packages/notebook/config_manager.py", line 132, in update
    self.set(section_name, data)
  File "/home/user/.local/lib/python3.8/site-packages/notebook/config_manager.py", line 109, in set
    self.ensure_config_dir_exists()
  File "/home/user/.local/lib/python3.8/site-packages/notebook/config_manager.py", line 66, in ensure_config_dir_exists
    os.makedirs(self.config_dir, 0o755)
  File "/usr/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/usr/lib/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/usr/etc'.

If I run this with sudo, it still do not succeed and says:

log with sudo
Traceback (most recent call last):
  File "/home/user/.local/bin/jupyter", line 5, in <module>
    from jupyter_core.command import main
ModuleNotFoundError: No module named 'jupyter_core'

@ChasingZenith
Copy link

ChasingZenith commented Dec 24, 2020

My workaround is like this:

mkdir /usr/etc/jupyter
sudo chmod 777 /usr/etc/jupyter
jupyter serverextension enable --sys-prefix jupyterlab_latex
sudo chmod 755 /usr/etc/jupyter # which is the default file mode bit

Then everything can work fine.

I find that it wants to create put something into /usr/etc/jupyter, but get permission denied error. So I make that directory for it and change the back.

Still wondering why this happens.

@ktaletsk ktaletsk added the bug label Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants