"No module named _clips"after installed pyclips

602 views Asked by At

I followed README to install pyclips in linux python2.7(ubuntu18),but it doesn’t work when “import clips”,like that:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "clips/__init__.py", line 36, in <module>
    from _clips_wrap import *
  File "clips/_clips_wrap.py", line 37, in <module>
    import _clips as _c
ImportError: No module named _clips

I ran these steps☹,and I didn’t do anything else (I also copied the words printed.)

(venv) vino@ubuntu:~/Desktop/pych-linux$ cd pyclips-1.0.7.343/

(venv) vino@ubuntu:~/Desktop/pych-linux/pyclips-1.0.7.343$ python setup.py build

Module 'clips': Python to CLIPS interface
Setup revision: $Id: setup.py 342 2008-02-22 01:17:23Z Franz $
finding low-level module symbols... Done!
building environment-aware submodule... Done!
Found CLIPS version: 6.30
'patch' utility found, applying selected patchsets...
Applying patchset 'ia64':
Applying patchset 'bgfx':
Applying patchset 'test':
Creating version number: Standard setup in progress:
running build
running build_py
copying clips/_version.py -> build/lib.linux-x86_64-2.7/clips
copying clips/_eclips_wrap.py -> build/lib.linux-x86_64-2.7/clips
running build_ext

(venv) vino@ubuntu:~/Desktop/pych-linux/pyclips-1.0.7.343$ su -c "python setup.py install"

Module 'clips': Python to CLIPS interface
Setup revision: $Id: setup.py 342 2008-02-22 01:17:23Z Franz $
finding low-level module symbols... Done!
building environment-aware submodule... Done!
Found CLIPS version: 6.30
'patch' utility found, applying selected patchsets...
Applying patchset 'ia64':
Applying patchset 'bgfx':
Applying patchset 'test':
Creating version number: Standard setup in progress:
running install
running build
running build_py
copying clips/_version.py -> build/lib.linux-x86_64-2.7/clips
copying clips/_eclips_wrap.py -> build/lib.linux-x86_64-2.7/clips
running build_ext
running install_lib
copying build/lib.linux-x86_64-2.7/clips/_version.py -> /usr/local/lib/python2.7/dist-packages/clips
copying build/lib.linux-x86_64-2.7/clips/_eclips_wrap.py -> /usr/local/lib/python2.7/dist-packages/clips
byte-compiling /usr/local/lib/python2.7/dist-packages/clips/_version.py to _version.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/clips/_eclips_wrap.py to _eclips_wrap.pyc
running install_egg_info
Removing /usr/local/lib/python2.7/dist-packages/pyclips-1.0.7.343.egg-info
Writing /usr/local/lib/python2.7/dist-packages/pyclips-1.0.7.343.egg-info

I am so appreciated if you could help me.

1

There are 1 answers

1
GiangHoang On

pip install --upgrade setuptools

One last note, do you happen to also have PyCLIPS installed within the system? The namespaces will conflict as the modules are both called clips. This would explain the error traceback:

Traceback (most recent call last): File "", line 1, in AttributeError: 'Environment' object has no attribute 'assert_string'