robert-dodier / maxima-jupyter

A Maxima kernel for Jupyter, based on CL-Jupyter (Common Lisp kernel)
Other
189 stars 31 forks source link

Problems in install-maxima-jupyter #33

Closed Hodapp87 closed 5 years ago

Hodapp87 commented 6 years ago

I was trying to follow the second installation method in https://github.com/robert-dodier/maxima-jupyter#quick-install, in particular, the command:

python3 ./install-maxima-jupyter.py --src=path/to/maxima-jupyter-src

This produces:

$ python3 ./install-maxima-jupyter.py --src=src

Maxima-Jupyter -- an enhanced interactive Maxima shell
CL-Jupyter (C) 2014-2015 Frederic Peschanski (cf. LICENSE)
Additional Maxima-specific stuff by Robert Dodier; thanks Frederic!
----
usage: install-maxima-jupyter.py [-h] [--user | --system | --prefix PREFIX]
                                 (--exec EXEC | --root ROOT) [--maxima MAXIMA]
install-maxima-jupyter.py: error: one of the arguments --exec --root is required

I took a guess that it needed --root and then I just get the error:

Maxima-Jupyter -- an enhanced interactive Maxima shell
CL-Jupyter (C) 2014-2015 Frederic Peschanski (cf. LICENSE)
Additional Maxima-specific stuff by Robert Dodier; thanks Frederic!
----
Traceback (most recent call last):
  File "./install-maxima-jupyter.py", line 87, in <module>
    prefix=args.prefix)
TypeError: install_kernel_spec() got an unexpected keyword argument 'prefix'
justineuro commented 6 years ago

The file: install-maxima-jupyter.py under the maxima-jupyter root folder may have the answer. The code for the --root option is:

g.add_argument('--root', help='Absoute path to root of Maxima-Jupyter, used for embedded kernel.')

So maybe it should be the --root option with the absolute path to the main or root directory of the maxima-jupyter folder and not to the src subdirectory directly below this root folder, e.g.,

 python3 ./install-maxima-jupyter.py --root=$PWD

if the curent present working directory is the maxima-jupyter root/main folder or,

 python3 ./install-maxima-jupyter.py --root=/absolute/path/to/the/maxima-jupyter-main-folder

The command

 python3 ./install-maxima-jupyter.py --root=src

will probably make jupyter notebook look for a main/root folder in a folder named srcunder the /usr/share/jupyter/kernels/maxima folder as this is where kernel.json is stored. The contents of kernel.json:

{"argv": ["maxima", "--very-quiet", "--preload-lisp=/MY-OS's-ABSOLUTE-PATH-TO/maxima-jupyter/load-maxima-jupyter.lisp", "--batch-string=jupyter_kernel_start(\"{connection_file}\")$"], "display_name": "Maxima", "language": "maxima"}

So the --root option probably points to the location of the file load-maxima-jupyter.lisp.
If installed with the option --root=src the kernel.json would probably look like:

{"argv": ["maxima", "--very-quiet", "--preload-lisp=src/load-maxima-jupyter.lisp", "--batch-string=jupyter_kernel_start(\"{connection_file}\")$"], "display_name": "Maxima", "language": "maxima"}

I was able to install in this way. jupyter notebook started and was able to locate the maxima kernel but so far there is a problem with the connection. I have yet to figure it out. I hope this info will be of some help.

robert-dodier commented 6 years ago

Hi, thanks for your interest in maxima-jupyter. What kind of system are you installing on? Any additional details that might provide some context would be helpful too.

I will try to find time this weekend to investigate a little bit about these problems.

justineuro commented 6 years ago

Please refer to Issue #34 . I read your message only after I have posted Issue #34 . I would be glad to provide more info, if needed. Best regards!

yitzchak commented 6 years ago

@robert-dodier There is some typos in the installation instructions. I'll submit a PR with the updates. Also, I can help out with troubleshooting this weekend.

yitzchak commented 6 years ago

@Hodapp87 What version of jupyter-client do you have on your system? It looks like the prefix argument was added to install_kernel_spec in version 4.3.0.

If you are on Ubuntu the system package is named python-jupyter-client. On Arch it is python-jupyter_client. If you installed Jupyter pip then the package should be in pip list with a name of jupyter-client.

Hodapp87 commented 6 years ago

Oh, I was looking at whatever version the stable API refers to. I'll check what version my distro installed.

robert-dodier commented 5 years ago

I've tried to clarify the installation instructions in Readme.md lately. I'm closing this issue, but if anyone is still having a problem, I encourage them to open a new issue.