gap-packages / JupyterKernel

Native Jupyter kernel for GAP
https://gap-packages.github.io/JupyterKernel/
BSD 3-Clause "New" or "Revised" License
19 stars 12 forks source link

Registering GAP with Jupyter #126

Closed Yue-Zhengyuan closed 2 years ago

Yue-Zhengyuan commented 2 years ago

In the README file, it is said that the GAP Jupyter kernel must be registered by running the following command in the pkg/JupyterKernel directory of your GAP installation:

pip3 install .

On macOS Monterey (12.1, Intel), I installed Python with Anaconda, and GAP with Homebrew. When I try to run the above command, I get the following error:

ERROR: Command errored out with exit status 2:
     command: /Users/username/anaconda3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/t7/fzzkl1gx70sg38lqgjsf2hbw0000gn/T/pip-req-build-t6miqr71/setup.py'"'"'; __file__='"'"'/private/var/folders/t7/fzzkl1gx70sg38lqgjsf2hbw0000gn/T/pip-req-build-t6miqr71/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/t7/fzzkl1gx70sg38lqgjsf2hbw0000gn/T/pip-pip-egg-info-ylmgo7n3
         cwd: /private/var/folders/t7/fzzkl1gx70sg38lqgjsf2hbw0000gn/T/pip-req-build-t6miqr71/
    Complete output (2 lines):
    usage: setup.py [-h] {install} ...
    setup.py: error: invalid choice: 'egg_info' (choose from 'install')
    ----------------------------------------
WARNING: Discarding file:///usr/local/Cellar/gap/4.11.1/libexec/pkg/JupyterKernel-1.3. Command errored out with exit status 2: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 2: python setup.py egg_info Check the logs for full command output.

But then I tried directly running python setup.py install (here python is my anaconda-installed Python) and it works. Maybe the documentation should be updated?

olexandr-konovalov commented 2 years ago

Thanks @Yue-Zhengyuan - the README you see on GitHub refers to the new version of the package, not yet included in the GAP release. The one you get with Homebrew is the latest release of GAP 4.11.1 and packages at that time. You had to check the README from your local installation of the JupyterKernel package, and it indeed should say python setup.py install. Glad that it worked that way.