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

Ubuntu 22.04LTS install issue #66

Open
mpettis opened this issue Oct 25, 2024 · 5 comments
Open

Ubuntu 22.04LTS install issue #66

mpettis opened this issue Oct 25, 2024 · 5 comments

Comments

@mpettis
Copy link

mpettis commented Oct 25, 2024

Having some trouble installing on Ubuntu 22.04LTS:

git clone https://github.com/noxdafox/clipspy.git
cd clipspy
make
sudo make install
#> ...
#> Using /home/mpettis/clipspy/.eggs/pycparser-2.22-py3.13.egg
#> Finished processing dependencies for clipspy==1.0.4

When I open a console with python:

#> Python 3.13.0 (main, Oct  8 2024, 08:51:28) [GCC 11.4.0] on linux
#> Type "help", "copyright", "credits" or "license" for more information.
#> >>> import clips
#> Traceback (most recent call last):
#>   File "<python-input-0>", line 1, in <module>
#>     import clips
#>   File "/home/mpettis/clipspy/clips/__init__.py", line 56, in <module>
#>     from clips.environment import Environment
#>   File "/home/mpettis/clipspy/clips/environment.py", line 32, in <module>
#>     from clips.facts import Facts
#>   File "/home/mpettis/clipspy/clips/facts.py", line 47, in <module>
#>     from clips.modules import Module
#>   File "/home/mpettis/clipspy/clips/modules.py", line 40, in <module>
#>     from clips.common import CLIPSError
#>   File "/home/mpettis/clipspy/clips/common.py", line 33, in <module>
#>     from clips._clips import lib, ffi
#> ModuleNotFoundError: No module named 'clips._clips'

Looks like author responded here, I am currently trying to work through the answer there: https://stackoverflow.com/questions/55033753/clipspy-getting-no-module-name-clips-clips-upon-importing-clips

Output from make:

(rpython) [mpettis@ip-10-0-200-174 clipspy (dev)]$ make
make -f makefile -C clips_source                                \
        CFLAGS="-std=c99 -O3 -fno-strict-aliasing -fPIC"                \
        LDLIBS="-lm -lrt"
make[1]: Entering directory '/home/mpettis/clipspy/clips_source'
gcc -o clips main.o -L. -lclips -lm -lrt
make[1]: Leaving directory '/home/mpettis/clipspy/clips_source'
ld -G clips_source/*.o -o clips_source/libclips.so
python setup.py build_ext --include-dirs=clips_source/          \
        --library-dirs=clips_source/
/home/mpettis/rpython/lib/python3.13/site-packages/setuptools/__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
running build_ext
generating cffi module 'build/temp.linux-x86_64-cpython-313/_clips.c'
already up-to-date
python setup.py sdist bdist_wheel
/home/mpettis/rpython/lib/python3.13/site-packages/setuptools/__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
running sdist
running egg_info
writing clipspy.egg-info/PKG-INFO
writing dependency_links to clipspy.egg-info/dependency_links.txt
writing requirements to clipspy.egg-info/requires.txt
writing top-level names to clipspy.egg-info/top_level.txt
reading manifest file 'clipspy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'version.py'
adding license file 'LICENSE.txt'
writing manifest file 'clipspy.egg-info/SOURCES.txt'
running check
creating clipspy-1.0.4
creating clipspy-1.0.4/clips
creating clipspy-1.0.4/clipspy.egg-info
creating clipspy-1.0.4/lib
copying files to clipspy-1.0.4...
copying LICENSE.txt -> clipspy-1.0.4
copying MANIFEST.in -> clipspy-1.0.4
copying README.rst -> clipspy-1.0.4
copying setup.cfg -> clipspy-1.0.4
copying setup.py -> clipspy-1.0.4
copying clips/__init__.py -> clipspy-1.0.4/clips
copying clips/agenda.py -> clipspy-1.0.4/clips
copying clips/classes.py -> clipspy-1.0.4/clips
copying clips/clips_build.py -> clipspy-1.0.4/clips
copying clips/common.py -> clipspy-1.0.4/clips
copying clips/environment.py -> clipspy-1.0.4/clips
copying clips/facts.py -> clipspy-1.0.4/clips
copying clips/functions.py -> clipspy-1.0.4/clips
copying clips/modules.py -> clipspy-1.0.4/clips
copying clips/routers.py -> clipspy-1.0.4/clips
copying clips/values.py -> clipspy-1.0.4/clips
copying clipspy.egg-info/PKG-INFO -> clipspy-1.0.4/clipspy.egg-info
copying clipspy.egg-info/SOURCES.txt -> clipspy-1.0.4/clipspy.egg-info
copying clipspy.egg-info/dependency_links.txt -> clipspy-1.0.4/clipspy.egg-info
copying clipspy.egg-info/requires.txt -> clipspy-1.0.4/clipspy.egg-info
copying clipspy.egg-info/top_level.txt -> clipspy-1.0.4/clipspy.egg-info
copying lib/clips.cdef -> clipspy-1.0.4/lib
copying clipspy.egg-info/SOURCES.txt -> clipspy-1.0.4/clipspy.egg-info
Writing clipspy-1.0.4/setup.cfg
Creating tar archive
removing 'clipspy-1.0.4' (and everything under it)
running bdist_wheel
running build
running build_py
copying clips/environment.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/agenda.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/values.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/routers.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/clips_build.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/modules.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/common.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/classes.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/__init__.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/functions.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/facts.py -> build/lib.linux-x86_64-cpython-313/clips
running build_ext
generating cffi module 'build/temp.linux-x86_64-cpython-313/_clips.c'
already up-to-date
/home/mpettis/rpython/lib/python3.13/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/clips
copying build/lib.linux-x86_64-cpython-313/clips/environment.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/agenda.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/values.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/routers.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/clips_build.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/modules.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/common.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/classes.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/__init__.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/functions.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/facts.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/_clips.abi3.so -> build/bdist.linux-x86_64/wheel/./clips
running install_data
creating build/bdist.linux-x86_64/wheel/clipspy-1.0.4.data/data
creating build/bdist.linux-x86_64/wheel/clipspy-1.0.4.data/data/lib
copying lib/clips.cdef -> build/bdist.linux-x86_64/wheel/clipspy-1.0.4.data/data/lib
running install_egg_info
Copying clipspy.egg-info to build/bdist.linux-x86_64/wheel/./clipspy-1.0.4-py3.13.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/clipspy-1.0.4.dist-info/WHEEL
creating 'dist/clipspy-1.0.4-cp313-cp313-linux_x86_64.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'clips/__init__.py'
adding 'clips/_clips.abi3.so'
adding 'clips/agenda.py'
adding 'clips/classes.py'
adding 'clips/clips_build.py'
adding 'clips/common.py'
adding 'clips/environment.py'
adding 'clips/facts.py'
adding 'clips/functions.py'
adding 'clips/modules.py'
adding 'clips/routers.py'
adding 'clips/values.py'
adding 'clipspy-1.0.4.data/data/lib/clips.cdef'
adding 'clipspy-1.0.4.dist-info/LICENSE.txt'
adding 'clipspy-1.0.4.dist-info/METADATA'
adding 'clipspy-1.0.4.dist-info/WHEEL'
adding 'clipspy-1.0.4.dist-info/top_level.txt'
adding 'clipspy-1.0.4.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel

Output from sudo make install PYTHON=/home/mpettis/rpython/bin/python ... note I am doing this with a venv:

(rpython) [mpettis@ip-10-0-200-174 clipspy (dev)]$ sudo make install PYTHON=/home/mpettis/rpython/bin/python
make -f makefile -C clips_source                                \
        CFLAGS="-std=c99 -O3 -fno-strict-aliasing -fPIC"                \
        LDLIBS="-lm -lrt"
make[1]: Entering directory '/home/mpettis/clipspy/clips_source'
gcc -o clips main.o -L. -lclips -lm -lrt
make[1]: Leaving directory '/home/mpettis/clipspy/clips_source'
ld -G clips_source/*.o -o clips_source/libclips.so
/home/mpettis/rpython/bin/python setup.py build_ext --include-dirs=clips_source/                \
        --library-dirs=clips_source/
/home/mpettis/rpython/lib/python3.13/site-packages/setuptools/__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
running build_ext
generating cffi module 'build/temp.linux-x86_64-cpython-313/_clips.c'
already up-to-date
/home/mpettis/rpython/bin/python setup.py sdist bdist_wheel
/home/mpettis/rpython/lib/python3.13/site-packages/setuptools/__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
running sdist
running egg_info
writing clipspy.egg-info/PKG-INFO
writing dependency_links to clipspy.egg-info/dependency_links.txt
writing requirements to clipspy.egg-info/requires.txt
writing top-level names to clipspy.egg-info/top_level.txt
reading manifest file 'clipspy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'version.py'
adding license file 'LICENSE.txt'
writing manifest file 'clipspy.egg-info/SOURCES.txt'
running check
creating clipspy-1.0.4
creating clipspy-1.0.4/clips
creating clipspy-1.0.4/clipspy.egg-info
creating clipspy-1.0.4/lib
copying files to clipspy-1.0.4...
copying LICENSE.txt -> clipspy-1.0.4
copying MANIFEST.in -> clipspy-1.0.4
copying README.rst -> clipspy-1.0.4
copying setup.cfg -> clipspy-1.0.4
copying setup.py -> clipspy-1.0.4
copying clips/__init__.py -> clipspy-1.0.4/clips
copying clips/agenda.py -> clipspy-1.0.4/clips
copying clips/classes.py -> clipspy-1.0.4/clips
copying clips/clips_build.py -> clipspy-1.0.4/clips
copying clips/common.py -> clipspy-1.0.4/clips
copying clips/environment.py -> clipspy-1.0.4/clips
copying clips/facts.py -> clipspy-1.0.4/clips
copying clips/functions.py -> clipspy-1.0.4/clips
copying clips/modules.py -> clipspy-1.0.4/clips
copying clips/routers.py -> clipspy-1.0.4/clips
copying clips/values.py -> clipspy-1.0.4/clips
copying clipspy.egg-info/PKG-INFO -> clipspy-1.0.4/clipspy.egg-info
copying clipspy.egg-info/SOURCES.txt -> clipspy-1.0.4/clipspy.egg-info
copying clipspy.egg-info/dependency_links.txt -> clipspy-1.0.4/clipspy.egg-info
copying clipspy.egg-info/requires.txt -> clipspy-1.0.4/clipspy.egg-info
copying clipspy.egg-info/top_level.txt -> clipspy-1.0.4/clipspy.egg-info
copying lib/clips.cdef -> clipspy-1.0.4/lib
copying clipspy.egg-info/SOURCES.txt -> clipspy-1.0.4/clipspy.egg-info
Writing clipspy-1.0.4/setup.cfg
Creating tar archive
removing 'clipspy-1.0.4' (and everything under it)
running bdist_wheel
running build
running build_py
copying clips/environment.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/agenda.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/values.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/routers.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/clips_build.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/modules.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/common.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/classes.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/__init__.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/functions.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/facts.py -> build/lib.linux-x86_64-cpython-313/clips
running build_ext
generating cffi module 'build/temp.linux-x86_64-cpython-313/_clips.c'
already up-to-date
/home/mpettis/rpython/lib/python3.13/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/clips
copying build/lib.linux-x86_64-cpython-313/clips/environment.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/agenda.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/values.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/routers.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/clips_build.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/modules.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/common.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/classes.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/__init__.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/functions.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/facts.py -> build/bdist.linux-x86_64/wheel/./clips
copying build/lib.linux-x86_64-cpython-313/clips/_clips.abi3.so -> build/bdist.linux-x86_64/wheel/./clips
running install_data
creating build/bdist.linux-x86_64/wheel/clipspy-1.0.4.data/data
creating build/bdist.linux-x86_64/wheel/clipspy-1.0.4.data/data/lib
copying lib/clips.cdef -> build/bdist.linux-x86_64/wheel/clipspy-1.0.4.data/data/lib
running install_egg_info
Copying clipspy.egg-info to build/bdist.linux-x86_64/wheel/./clipspy-1.0.4-py3.13.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/clipspy-1.0.4.dist-info/WHEEL
creating 'dist/clipspy-1.0.4-cp313-cp313-linux_x86_64.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'clips/__init__.py'
adding 'clips/_clips.abi3.so'
adding 'clips/agenda.py'
adding 'clips/classes.py'
adding 'clips/clips_build.py'
adding 'clips/common.py'
adding 'clips/environment.py'
adding 'clips/facts.py'
adding 'clips/functions.py'
adding 'clips/modules.py'
adding 'clips/routers.py'
adding 'clips/values.py'
adding 'clipspy-1.0.4.data/data/lib/clips.cdef'
adding 'clipspy-1.0.4.dist-info/LICENSE.txt'
adding 'clipspy-1.0.4.dist-info/METADATA'
adding 'clipspy-1.0.4.dist-info/WHEEL'
adding 'clipspy-1.0.4.dist-info/top_level.txt'
adding 'clipspy-1.0.4.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
install -d /usr/local/include/
install -m 644 clips_source/clips.h /usr/local/include/
install -d /usr/local/include/clips
install -m 644 clips_source/*.h /usr/local/include/clips/
install -d /usr/local/lib/
install -m 644 clips_source/libclips.so                                 \
        /usr/local/lib/libclips.so.6.41
ln -sf /usr/local/lib/libclips.so.6.41          \
        /usr/local/lib/libclips.so.6
ln -sf /usr/local/lib/libclips.so.6.41          \
        /usr/local/lib/libclips.so
ldconfig -n -v /usr/local/lib
/usr/local/lib: (from <cmdline>:0)
        libclips.so.6.41 -> libclips.so.6.41
/home/mpettis/rpython/bin/python setup.py install
/home/mpettis/rpython/lib/python3.13/site-packages/setuptools/__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
running install
/home/mpettis/rpython/lib/python3.13/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
/home/mpettis/rpython/lib/python3.13/site-packages/setuptools/_distutils/cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` and ``easy_install``.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

!!
  self.initialize_options()
running bdist_egg
running egg_info
writing clipspy.egg-info/PKG-INFO
writing dependency_links to clipspy.egg-info/dependency_links.txt
writing requirements to clipspy.egg-info/requires.txt
writing top-level names to clipspy.egg-info/top_level.txt
reading manifest file 'clipspy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'version.py'
adding license file 'LICENSE.txt'
writing manifest file 'clipspy.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying clips/environment.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/agenda.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/values.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/routers.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/clips_build.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/modules.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/common.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/classes.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/__init__.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/functions.py -> build/lib.linux-x86_64-cpython-313/clips
copying clips/facts.py -> build/lib.linux-x86_64-cpython-313/clips
running build_ext
generating cffi module 'build/temp.linux-x86_64-cpython-313/_clips.c'
already up-to-date
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/clips
copying build/lib.linux-x86_64-cpython-313/clips/environment.py -> build/bdist.linux-x86_64/egg/clips
copying build/lib.linux-x86_64-cpython-313/clips/agenda.py -> build/bdist.linux-x86_64/egg/clips
copying build/lib.linux-x86_64-cpython-313/clips/values.py -> build/bdist.linux-x86_64/egg/clips
copying build/lib.linux-x86_64-cpython-313/clips/routers.py -> build/bdist.linux-x86_64/egg/clips
copying build/lib.linux-x86_64-cpython-313/clips/clips_build.py -> build/bdist.linux-x86_64/egg/clips
copying build/lib.linux-x86_64-cpython-313/clips/modules.py -> build/bdist.linux-x86_64/egg/clips
copying build/lib.linux-x86_64-cpython-313/clips/common.py -> build/bdist.linux-x86_64/egg/clips
copying build/lib.linux-x86_64-cpython-313/clips/classes.py -> build/bdist.linux-x86_64/egg/clips
copying build/lib.linux-x86_64-cpython-313/clips/__init__.py -> build/bdist.linux-x86_64/egg/clips
copying build/lib.linux-x86_64-cpython-313/clips/functions.py -> build/bdist.linux-x86_64/egg/clips
copying build/lib.linux-x86_64-cpython-313/clips/facts.py -> build/bdist.linux-x86_64/egg/clips
copying build/lib.linux-x86_64-cpython-313/clips/_clips.abi3.so -> build/bdist.linux-x86_64/egg/clips
byte-compiling build/bdist.linux-x86_64/egg/clips/environment.py to environment.cpython-313.pyc
byte-compiling build/bdist.linux-x86_64/egg/clips/agenda.py to agenda.cpython-313.pyc
byte-compiling build/bdist.linux-x86_64/egg/clips/values.py to values.cpython-313.pyc
byte-compiling build/bdist.linux-x86_64/egg/clips/routers.py to routers.cpython-313.pyc
byte-compiling build/bdist.linux-x86_64/egg/clips/clips_build.py to clips_build.cpython-313.pyc
byte-compiling build/bdist.linux-x86_64/egg/clips/modules.py to modules.cpython-313.pyc
byte-compiling build/bdist.linux-x86_64/egg/clips/common.py to common.cpython-313.pyc
byte-compiling build/bdist.linux-x86_64/egg/clips/classes.py to classes.cpython-313.pyc
byte-compiling build/bdist.linux-x86_64/egg/clips/__init__.py to __init__.cpython-313.pyc
byte-compiling build/bdist.linux-x86_64/egg/clips/functions.py to functions.cpython-313.pyc
byte-compiling build/bdist.linux-x86_64/egg/clips/facts.py to facts.cpython-313.pyc
creating stub loader for clips/_clips.abi3.so
byte-compiling build/bdist.linux-x86_64/egg/clips/_clips.py to _clips.cpython-313.pyc
installing package data to build/bdist.linux-x86_64/egg
running install_data
creating build/bdist.linux-x86_64/egg/lib
copying lib/clips.cdef -> build/bdist.linux-x86_64/egg/lib
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying clipspy.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying clipspy.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying clipspy.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying clipspy.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying clipspy.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
clips.__pycache__._clips.cpython-313: module references __file__
creating 'dist/clipspy-1.0.4-py3.13-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing clipspy-1.0.4-py3.13-linux-x86_64.egg
removing '/home/mpettis/rpython/lib/python3.13/site-packages/clipspy-1.0.4-py3.13-linux-x86_64.egg' (and everything under it)
creating /home/mpettis/rpython/lib/python3.13/site-packages/clipspy-1.0.4-py3.13-linux-x86_64.egg
Extracting clipspy-1.0.4-py3.13-linux-x86_64.egg to /home/mpettis/rpython/lib/python3.13/site-packages
Adding clipspy 1.0.4 to easy-install.pth file

Installed /home/mpettis/rpython/lib/python3.13/site-packages/clipspy-1.0.4-py3.13-linux-x86_64.egg
Processing dependencies for clipspy==1.0.4
Searching for cffi==1.17.1
Best match: cffi 1.17.1
Processing cffi-1.17.1-py3.13-linux-x86_64.egg
cffi 1.17.1 is already the active version in easy-install.pth

Using /home/mpettis/clipspy/.eggs/cffi-1.17.1-py3.13-linux-x86_64.egg
Searching for pycparser==2.22
Best match: pycparser 2.22
Processing pycparser-2.22-py3.13.egg
pycparser 2.22 is already the active version in easy-install.pth

Using /home/mpettis/clipspy/.eggs/pycparser-2.22-py3.13.egg
Finished processing dependencies for clipspy==1.0.4

When I try to import in console:

(rpython) [mpettis@ip-10-0-200-174 clipspy (dev)]$ python
Python 3.13.0 (main, Oct  8 2024, 08:51:28) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import clips
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    import clips
  File "/home/mpettis/clipspy/clips/__init__.py", line 56, in <module>
    from clips.environment import Environment
  File "/home/mpettis/clipspy/clips/environment.py", line 32, in <module>
    from clips.facts import Facts
  File "/home/mpettis/clipspy/clips/facts.py", line 47, in <module>
    from clips.modules import Module
  File "/home/mpettis/clipspy/clips/modules.py", line 40, in <module>
    from clips.common import CLIPSError
  File "/home/mpettis/clipspy/clips/common.py", line 33, in <module>
    from clips._clips import lib, ffi
ModuleNotFoundError: No module named 'clips._clips'
>>>

TIA

@noxdafox
Copy link
Owner

Hello,

the binary package for Python 3.13 is not supported. You can install clipspy on Python 3.12.

I will add the build for 3.13 ASAP.

noxdafox added a commit that referenced this issue Oct 26, 2024
Signed-off-by: Matteo Cafasso <[email protected]>
@mpettis
Copy link
Author

mpettis commented Oct 28, 2024

Thank you so much for your help.

I have gone back to python3.12, and done make/make install in a virtual environment. That seemed to work fine, but I'm now getting a different error saying libclips.so can't be found. But it was indeed installed into the default directory of the Makefile. Please advise, output below:

#> (rpython) mpettis@ubuntu-s-1vcpu-1gb-nyc1-01:~/rpython$ python
#> Python 3.12.7 (main, Oct  1 2024, 08:52:12) [GCC 11.4.0] on linux
#> Type "help", "copyright", "credits" or "license" for more information.
#> >>> import clips
#> Traceback (most recent call last):
#>   File "<stdin>", line 1, in <module>
#>   File "/home/mpettis/rpython/lib/python3.12/site-packages/clipspy-1.0.4-py3.12-linux-x86_64.egg/clips/__init__.py", line 56, in <module>
#>     from clips.environment import Environment
#>   File "/home/mpettis/rpython/lib/python3.12/site-packages/clipspy-1.0.4-py3.12-linux-x86_64.egg/clips/environment.py", line 32, in <module>
#>     from clips.facts import Facts
#>   File "/home/mpettis/rpython/lib/python3.12/site-packages/clipspy-1.0.4-py3.12-linux-x86_64.egg/clips/facts.py", line 47, in <module>
#>     from clips.modules import Module
#>   File "/home/mpettis/rpython/lib/python3.12/site-packages/clipspy-1.0.4-py3.12-linux-x86_64.egg/clips/modules.py", line 40, in <module>
#>     from clips.common import CLIPSError
#>   File "/home/mpettis/rpython/lib/python3.12/site-packages/clipspy-1.0.4-py3.12-linux-x86_64.egg/clips/common.py", line 33, in <module>
#>     from clips._clips import lib, ffi
#> ImportError: libclips.so: cannot open shared object file: No such file or directory

But I can confirm that I have the shared library built, and should be accessible, as it is in the Makefile default path:

#> (rpython) mpettis@ubuntu-s-1vcpu-1gb-nyc1-01:~/rpython$ ll /usr/local/lib/
#> total 1356
#> drwxr-xr-x 3 root root    4096 Nov 26  2023 R
#> drwxr-xr-x 3 root root    4096 Sep  4 20:49 clojure
#> lrwxrwxrwx 1 root root      31 Oct 28 00:52 libclips.so -> /usr/local/lib/libclips.so.6.41
#> lrwxrwxrwx 1 root root      31 Oct 28 00:52 libclips.so.6 -> /usr/local/lib/libclips.so.6.41
#> -rw-r--r-- 1 root root 1367408 Oct 28 00:52 libclips.so.6.41
#> drwxr-xr-x 3 root root    4096 Mar 17  2023 python3.10
#> drwxr-xr-x 3 root root    4096 Oct 27 23:35 python3.12
#> drwxr-xr-x 3 root root    4096 Oct 26 12:43 python3.13

@mpettis
Copy link
Author

mpettis commented Oct 28, 2024

FYI, I have gone back to using python3.10 to do a python3 -m pip install clipspy and that works perfectly fine, thank you. So I can now start working with the package. The method of building here still doesn't work for me, but I am ok with it, and it is your call as to fixing the issue I have here (which may just be user error on my part). I'll be happy to try things if you post possible solutions you want tested here if that is of help to you.

@noxdafox
Copy link
Owner

The package is ment to be installed with pip. No reason to use make. Python is supported up to 3.12. I will build a binary for 3.13.

I will also try to simplify the make process.

@mpettis
Copy link
Author

mpettis commented Oct 28, 2024

Thanks, got it. I think I just got lost in the process, where I tried to do a pip install on 3.13, it failed, and then I went to trying to do the make/make install route, got lost in the weeds, and then today realized that I could do it with 3.10. I think the other thing I got hung up in in this process, which is tangentially related to this, is that the setup/distutils way of installing is deprecated in 3.12, and I ran into issues like getting the venv module to work because I had to apt install setuptools and distutils, as they would not pip install. That would have been a problem regardless of me trying to do a clipspy install. Anyway, thanks for this, I am set with python3.10.

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