noxdafox / iclips

CLIPS Jupyter console

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ImportError: libclips.so: cannot open shared object file: No such file or directory

KROSF opened this issue · comments

I'm trying to create a docker container with your library by i'm getting that error

I used ubuntu:xenial image from docker hub
I installed all dependencies following the documentation

Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.5/dist-packages/iclips/clips_kernel.py", line 26, in <module>
    import clips
  File "/usr/local/lib/python3.5/dist-packages/clips/__init__.py", line 30, in <module>
    from clips.error import CLIPSError
  File "/usr/local/lib/python3.5/dist-packages/clips/error.py", line 32, in <module>
    from clips.router import Router
  File "/usr/local/lib/python3.5/dist-packages/clips/router.py", line 5, in <module>
    from clips._clips import lib, ffi
ImportError: libclips.so: cannot open shared object file: No such file or directory

Hello,

Did you follow the installation instructions in the documentation?

You need first to install libclips 6.30 as it's a C library and pip cannot retrieve it.

If Ubuntu does not ship the latest deb packages, you can retrieve them from Debian Unstable: library and headers.

Hello, thanks for answer

Yes, I followed the installation instructions in the documentation.

As i said before i'm using docker so the first i did was

docker pull debian
docker run -ti --name debian library/debian /bin/bash

and then

sudo apt update && sudo apt upgrade
sudo apt install build-essential
sudo apt install libclips libclips-dev
sudo apt install python3 python3-pip python3-cffi
sudo pip3 install iclips

now i getting these errors

Unfortunately, it seems Debian stable still provides CLIPS 6.24. You will need to retrieve the packages from the unstable distribution.

Please try modifying your script as follows.

sudo apt update && sudo apt upgrade
sudo apt install build-essential wget
sudo apt install python3 python3-pip python3-cffi

# Download and install CLIPS packages via dpkg
wget http://ftp.es.debian.org/debian/pool/main/c/clips/libclips_6.30-4+b1_amd64.deb
wget http://ftp.es.debian.org/debian/pool/main/c/clips/libclips-dev_6.30-4+b1_amd64.deb
sudo dpkg -i libclips_6.30-4+b1_amd64.deb libclips-dev_6.30-4+b1_amd64.deb
rm libclips_6.30-4+b1_amd64.deb libclips-dev_6.30-4+b1_amd64.deb

sudo pip3 install iclips

I followed your instructions an all is working except the syntax highlighting
screenshot 2018-12-13 at 17 15 24
Thanks for helping me.

Yes, syntax highlighting on the Jupiter Notebook is not supported. Jupiter uses two different syntax highlighting libraries.

  1. Pygments for the console and notebook exports
  2. CodeMirror for the web frontend

Unfortunately, neither of the two provide CLIPS syntax highlighting. Developing a Pygment lexer was easy for me as it's Python but, as I am not familiar with Javascript, I did not have the time to do the same for CodeMirror.

OFC, any contribution is more than welcome.

Just FYI, I added a Dockerfile providing a container with CLIPS and Jupyter Notebook installed.