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

SBCL say "Package QL does not exist.". #86

Closed
harupiyo opened this issue Nov 3, 2021 · 2 comments
Closed

SBCL say "Package QL does not exist.". #86

harupiyo opened this issue Nov 3, 2021 · 2 comments

Comments

@harupiyo
Copy link

harupiyo commented Nov 3, 2021

Hello,

I try to setup 'clj' on roswell, but SBCL say "Package QL does not exist.".

For your reference, here is a video of the process.
https://youtu.be/UvlDT_UnHu0

It is SBCL on roswell, so it should not be that Quicklisp is not included.
I can also check by doing the following:

$ ros run
* (find-package :ql)
#<PACKAGE "QUICKLISP-CLIENT">

Is there anything I should do? (Setup logs is attached.)

Description

On Jupyter Console

$ jupyter-console --kernel=common-lisp

This is SBCL 2.1.9, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.

debugger invoked on a SB-INT:SIMPLE-READER-PACKAGE-ERROR in thread
#<THREAD "main thread" RUNNING {1001540103}>:
  Package QL does not exist.										<---- ERROR.

    Stream: #<dynamic-extent STRING-INPUT-STREAM (unavailable) from "(ql:quic...">

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE ] Use the current package, COMMON-LISP-USER.
  1: [RETRY    ] Retry finding the package.
  2: [USE-VALUE] Specify a different package
  3: [UNINTERN ] Read the symbol as uninterned.
  4: [SYMBOL   ] Specify a symbol to return
  5:             Ignore runtime option --eval "(ql:quickload :common-lisp-jupyter)".
  6: [ABORT    ] Skip rest of --eval and --load options.
  7:             Skip to toplevel READ/EVAL/PRINT loop.
  8: [EXIT     ] Exit SBCL (calling #'EXIT, killing the process).

(SB-IMPL::READER-FIND-PACKAGE "QL" #<SB-IMPL::STRING-INPUT-STREAM {7F89FE877993}> T)
0] 
* ^C						<---- The REPL cannot be used and can only be interrupted.

(Python3 on Jupyter Console can't run.)

I don't think it's related, but the Jupyter Console has an Issue jupyter/jupyter_console#241
and doesn't work in Python3. (I don't think this is related because the error is different.)

$ jupyter-console 
Jupyter console 6.4.0

Python 3.8.10 (default, Sep 28 2021, 16:10:42) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.28.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: "hello"[Enter]/home/harupiyo/.local/lib/python3.8/site-packages/jupyter_console/ptshell.py:852: RuntimeWarning: coroutine 'ZMQSocketChannel.msg_ready' was never awaited
  while self.client.iopub_channel.msg_ready():
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

Unhandled exception in event loop:
	(Backtrace)
	... >8  ...

On Jupyter Lab

In Jupyter Lab, Python3 works correctly.

But the SBCL says

  1. "Package QL does not exist."
  2. SBCL then seems to reboot, repeating the same error and displaying a banner saying to restart SBCL.
  3. Eventually, the Kernel dies and the message "SBCL" -> "No Kernel" changes in Jupyter Lab, and SBCL will not restart any more.

For your reference, here is a video of the process.
https://youtu.be/UvlDT_UnHu0

My PC's Setup log:

  • Ubuntu 20.04 on VirtualBox (Clean Install)
$ sudo apt install -y gcc make perl

# roswell

$ sudo apt -y install git build-essential automake libcurl4-openssl-dev
$ git clone -b release https://github.com/roswell/roswell.git
$ cd roswell
$ sh bootstrap
$ ./configure
$ make
$ sudo make install
$ ros setup
$ cd ~/

# common-lisp-jupyter

$ sudo apt install -y libczmq-dev
$ mkdir ~/common-lisp

## ref: https://github.com/yitzchak/common-lisp-jupyter/blob/master/Dockerfile#L74

$ git clone https://github.com/yitzchak/common-lisp-jupyter ~/common-lisp/common-lisp-jupyter
$ git clone https://github.com/yitzchak/shash ~/common-lisp/shasht
$ git clone https://github.com/yitzchak/cytoscape-clj ~/common-lisp/cytoscape-clj
$ git clone https://github.com/yitzchak/resizable-box-clj ~/common-lisp/resizable-box-clj

## examples

$ mv ~/common-lisp/common-lisp-jupyter/examples ~/lab
$ mv ~/common-lisp/cytoscape-clj/examples ~/lab/cytoscape-clj
	
## Install 

$ ros run -- --non-interactive --eval "(ql:quickload '(:common-lisp-jupyter :cytoscape-clj :resizable-box-clj))" --eval "(clj:install :use-implementation t)"; 

# Jupyter Lab & Jupyter Console

$ sudo apt install -y python3-pip
$ pip install jupyterlab jupyter-console
$ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
$ export PATH="$HOME/.local/bin:$PATH"

## Jupyter Lab Extensions

### node.js(v14) for jupyterlab-debugger-restarts

$ sudo apt install -y curl
$ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
$ sudo apt install -y nodejs

### ref: https://github.com/yitzchak/common-lisp-jupyter/blob/master/Dockerfile#L49

$ jupyter-labextension install @jupyter-widgets/jupyterlab-manager jupyterlab-edit-magic cytoscape-clj resizable-box-clj jupyterlab-debugger-restarts
$ jupyter-lab build

# Starting Jupyter Console

$ cd ~/lab
$ jupyter-console --kernel=common-lisp

This is SBCL 2.1.9, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.

debugger invoked on a SB-INT:SIMPLE-READER-PACKAGE-ERROR in thread
#<THREAD "main thread" RUNNING {1001540103}>:
  Package QL does not exist.										<---- ERROR.

    Stream: #<dynamic-extent STRING-INPUT-STREAM (unavailable) from "(ql:quic...">

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE ] Use the current package, COMMON-LISP-USER.
  1: [RETRY    ] Retry finding the package.
  2: [USE-VALUE] Specify a different package
  3: [UNINTERN ] Read the symbol as uninterned.
  4: [SYMBOL   ] Specify a symbol to return
  5:             Ignore runtime option --eval "(ql:quickload :common-lisp-jupyter)".
  6: [ABORT    ] Skip rest of --eval and --load options.
  7:             Skip to toplevel READ/EVAL/PRINT loop.
  8: [EXIT     ] Exit SBCL (calling #'EXIT, killing the process).

(SB-IMPL::READER-FIND-PACKAGE "QL" #<SB-IMPL::STRING-INPUT-STREAM {7F89FE877993}> T)
0] 
* ^C
@yitzchak
Copy link
Owner

yitzchak commented Nov 3, 2021

Roswell installation is not done the same way. Normally it is done automatically when you install the package via roswell.

ros install common-lisp-jupyter

This installs the script cl-jupyter and a kernel also.

@harupiyo
Copy link
Author

harupiyo commented Nov 5, 2021

Thank you for pointing this out.

My installation was incorrect.

I tried it again as per the installation manual and it worked correctly.

https://yitzchak.github.io/common-lisp-jupyter/install

Thank you!

P.S.
Here is the log of my re-installation, for others' reference:

harupiyo@harupiyo-VirtualBox:~$ ros run
* (ql:update-dist "quicklisp")
* (exit)
harupiyo@harupiyo-VirtualBox:~$ echo "export PATH=$PATH:~/.roswell/bin" >> ~/.bashrc
harupiyo@harupiyo-VirtualBox:~$ source ~/.bashrc
harupiyo@harupiyo-VirtualBox:~$ ros install common-lisp-jupyter
harupiyo@harupiyo-VirtualBox:~$ jupyter-lab 							; OK!
harupiyo@harupiyo-VirtualBox:~$ jupyter-console --kernel=common-lisp	; OK! (However, there is another problem with Python 3.)
Jupyter console 6.4.0

common-lisp-jupyter: a Common Lisp Jupyter kernel
(C) 2019-2020 Tarn Burton (MIT)
In [1]: 1
/home/harupiyo/.local/lib/python3.8/site-packages/jupyter_console/ptshell.py:852: RuntimeWarning: coroutine 'ZMQSocketChannel.msg_ready' was never awaited
  while self.client.iopub_channel.msg_ready():
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

Unhandled exception in event loop:
  File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/home/harupiyo/.local/lib/python3.8/site-packages/prompt_toolkit/input/vt100.py", line 168, in callback_wrapper
    callback()
  File "/home/harupiyo/.local/lib/python3.8/site-packages/prompt_toolkit/application/application.py", line 691, in read_from_input
    self.key_processor.process_keys()
  File "/home/harupiyo/.local/lib/python3.8/site-packages/prompt_toolkit/key_binding/key_processor.py", line 274, in process_keys
    self._process_coroutine.send(key_press)
  File "/home/harupiyo/.local/lib/python3.8/site-packages/prompt_toolkit/key_binding/key_processor.py", line 186, in _process
    self._call_handler(matches[-1], key_sequence=buffer[:])
  File "/home/harupiyo/.local/lib/python3.8/site-packages/prompt_toolkit/key_binding/key_processor.py", line 329, in _call_handler
    handler.call(event)
  File "/home/harupiyo/.local/lib/python3.8/site-packages/prompt_toolkit/key_binding/key_bindings.py", line 102, in call
    result = self.handler(event)
  File "/home/harupiyo/.local/lib/python3.8/site-packages/jupyter_console/ptshell.py", line 475, in _
    self.handle_iopub()
  File "/home/harupiyo/.local/lib/python3.8/site-packages/jupyter_console/ptshell.py", line 854, in handle_iopub
    msg_type = sub_msg['header']['msg_type']

Exception 'coroutine' object is not subscriptable
Press ENTER to continue...						<----- Loop after ENTER, need KILL process

@harupiyo harupiyo closed this as completed Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants