GLIF through Jupyter - Installationsprobleme

Disclaimer: Dieser Thread wurde aus dem alten Forum importiert. Daher werden eventuell nicht alle Formatierungen richtig angezeigt. Der ursprüngliche Thread beginnt im zweiten Post dieses Threads.

GLIF through Jupyter - Installationsprobleme
Problem 1: MMT

Ich habe die mmt.jar heruntergeladen und nach https://uniformal.github.io//doc/setup/ installiert.
Nach dem Start des Notebooks wirft es mir folgende Fehlermeldung:

[I 11:11:16.805 NotebookApp] Kernel started: 703b3cfb-be69-479f-bbd1-31c23ffca77a
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/blue/.local/lib/python3.8/site-packages/glif_kernel/__main__.py", line 4, in <module>
    IPKernelApp.launch_instance(kernel_class=GLFKernel)
  File "/home/blue/.local/lib/python3.8/site-packages/traitlets/config/application.py", line 844, in launch_instance
    app.initialize(argv)
  File "/home/blue/.local/lib/python3.8/site-packages/traitlets/config/application.py", line 87, in inner
    return method(app, *args, **kwargs)
  File "/home/blue/.local/lib/python3.8/site-packages/ipykernel/kernelapp.py", line 582, in initialize
    self.init_kernel()
  File "/home/blue/.local/lib/python3.8/site-packages/ipykernel/kernelapp.py", line 444, in init_kernel
    kernel = kernel_factory(parent=self, session=self.session,
  File "/home/blue/.local/lib/python3.8/site-packages/traitlets/config/configurable.py", line 537, in instance
    inst = cls(*args, **kwargs)
  File "/home/blue/.local/lib/python3.8/site-packages/glif_kernel/kernel.py", line 83, in __init__
    self.GFRepl = GLFRepl()
  File "/home/blue/.local/lib/python3.8/site-packages/glif_kernel/GLFRepl.py", line 40, in __init__
    self.mmtInterface = MMTInterface(MMT_PATH)
  File "/home/blue/.local/lib/python3.8/site-packages/glif_kernel/MMTInterface.py", line 47, in __init__
    self.content_path = self.do_get_content_path()
  File "/home/blue/.local/lib/python3.8/site-packages/glif_kernel/MMTInterface.py", line 263, in do_get_content_path
    with open(join(self.mmt_path, 'deploy', 'mmtrc'), 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/blue/MMT/deploy/mmtrc'
Exception in thread "main" java.lang.NullPointerException
        at info.kwarc.mmt.repl.ExtendedREPL.eval(ExtendedREPL.scala:21)
        at info.kwarc.mmt.repl.REPLImpl.$anonfun$run$1(REPLImpl.scala:127)
        at info.kwarc.mmt.repl.REPLImpl.$anonfun$run$1$adapted(REPLImpl.scala:127)
        at scala.Option.forall(Option.scala:390)
        at info.kwarc.mmt.repl.REPLImpl.run(REPLImpl.scala:127)
        at info.kwarc.mmt.api.frontend.Shell.mainRaw(Shell.scala:201)
        at info.kwarc.mmt.api.frontend.Shell.main(Shell.scala:58)
        at info.kwarc.mmt.api.frontend.Run.main(Shell.scala)

Problem 2: Syntax-Highlighting

jupyter labextension install jupyterlab-gf-highlight

wirft

blue@DESKTOP-2OTQU68:~$ jupyter labextension install jupyterlab-gf-highlight
Traceback (most recent call last):
  File "/usr/bin/jupyter", line 11, in <module>
    load_entry_point('jupyter-core==4.6.3', 'console_scripts', 'jupyter')()
  File "/usr/lib/python3/dist-packages/jupyter_core/command.py", line 247, in main
    command = _jupyter_abspath(subcommand)
  File "/usr/lib/python3/dist-packages/jupyter_core/command.py", line 133, in _jupyter_abspath
    raise Exception(
Exception: Jupyter command `jupyter-labextension` not found.

Auf https://github.com/kaiamann/jupyterlab-gf-highlight steht “To install using pip:”. Muss ich mehr machen als nur “jupyter labextension install jupyterlab-gf-highlight” ausführen?


Problem 1

Der Fehler ist, dass es die Konfigurationsdatei “/home/blue/MMT/deploy/mmtrc” nicht gibt. Das liegt vermutlich daran, das der MMT setup nicht ausgeführt wurde:

java -jar path/to/mmt.jar :setup

Ich hoffe, dass das weiterhilft.

Problem 2

Ist der GLIF Jupyter kernel schon installiert? Das sollte (hoffentlich) alle dependencies installieren. Also:

git clone https://github.com/KWARC/GLIF.git
cd GLIF
pip install .
python -m glif_kernel.install

Danke.
Ich dachte ich hätte beides gemacht. Jetzt nocheinmal, hat das Problem aber nicht behoben.
Nach zwei Tagen bin ich aber bereit einfach das Docker image zu benutzen.


Docker image sollte auch eine gute Möglichkeit sein.

Wenn jemand anderes dasgleiche Problem hat: [m]java -jar path/to/mmt.jar :setup[/m] sollte mit folgenden Logs beginnen:

This is MMT's setup routine.
MMT is provided self-contained, so there is not much to do.
But I'll create a few auxiliary files for you and (if you have 'git' and internet) checkout some basic archives.
I will also try to setup the integration with jEdit for you.



Enter a folder into which archives should be checked out (/home/jfs/mmt/systems/MMT-content): 
/home/jfs/mmt/content/MathHub
MMT will be installed using the following data
MMT system folder:     /home/jfs/mmt/systems/MMT
MMT content folder:    /home/jfs/mmt/content/MathHub
jEdit settings folder: /home/jfs/.jedit


generating /home/jfs/mmt/systems/MMT/deploy/mmtrc
done

Da steht dann explizit, dass die mmtrc-Datei erstellt wird…