noxdafox / clipspy

Python CFFI bindings for the 'C' Language Integrated Production System CLIPS
BSD 3-Clause "New" or "Revised" License
177 stars 32 forks source link

Error when installing clipspy #17

Closed slozovsky closed 5 years ago

slozovsky commented 5 years ago

Hi,

I've got following error:

[root@vxe localhost clipspy-0.3.2]# pip install clipspy
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting clipspy
  Using cached https://files.pythonhosted.org/packages/ac/ad/d7ad66a0290fbe6401219e84242be5be3cb1cdabac34ba9f4cd76f016678/clipspy-0.3.2.tar.gz
    Complete output from command python setup.py egg_info:
    fatal: Not a git repository (or any of the parent directories): .git

    Installed /tmp/pip-install-W94xoq/clipspy/cffi-1.12.1-py2.7-linux-x86_64.egg
    error in clipspy setup command: Invalid environment marker: python_version<'3'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-W94xoq/clipspy/

Why would set up even try to call git? How can I fix that?

Building through make:

make[1]: Leaving directory `/home/slozovsky/CLIPS/clipspy-git/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
error in clipspy setup command: Invalid environment marker: python_version<'3'
make: *** [clipspy] Error 1

Clipspy worked with Python 2.7 before...

noxdafox commented 5 years ago

Hello,

the error suggests you are using an old version of setuptools.

What is the output of the command:

$ easy_install --version

Have you tried updating setuptools?

$ sudo pip install -U setuptools
slozovsky commented 5 years ago

That worked. Thanks!

# easy_install --version
setuptools 0.9.8

After upgrade:

# easy_install --version
setuptools 40.8.0 from /usr/lib/python2.7/site-packages (Python 2.7)

I'm curious why clipspy is so sensitive to setuptools version? Other packages didn't complain.?

noxdafox commented 5 years ago

clipspy uses modern features of setuptools as it makes the logic simpler and more convenient. Moreover, clipspy relies on cffi integrations with setuptools to build and link against the CLIPS libraries.

I don't know why Python still ships such an outdated version of setuptools anyways. 0.9.8 was last released in July 2013.

Also please consider upgrading to Python 3. Python 2 is deprecated and not going to be maintained anymore in 2020. The new versions of clipspy will not be compatible with Python 2 anymore.