kylessmith/ailist

Pip installation problem

NTNguyen13 opened this issue · 3 comments

Hi, I tried to install AIList recently, I have cython, gcc, g++ already installed.
When I ran pip install ailist, it returned this error

  Building wheel for ailist (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6yj7p0mp/ailist/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6yj7p0mp/ailist/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-eoovt0y_
       cwd: /tmp/pip-install-6yj7p0mp/ailist/
  Complete output (24 lines):
  build configuration selected: optimized
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/ailist
  copying ailist/__init__.py -> build/lib.linux-x86_64-3.6/ailist
  copying ailist/ailist.pxd -> build/lib.linux-x86_64-3.6/ailist
  copying ailist/ailist.pyx -> build/lib.linux-x86_64-3.6/ailist
  copying ailist/ailist.c -> build/lib.linux-x86_64-3.6/ailist
  copying ailist/radix_interval_sort.c -> build/lib.linux-x86_64-3.6/ailist
  copying ailist/augmented_interval_list.c -> build/lib.linux-x86_64-3.6/ailist
  copying ailist/augmented_interval_list.h -> build/lib.linux-x86_64-3.6/ailist
  running build_ext
  building 'ailist.ailist' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/ailist
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -Iailist -I. -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include/python3.6m -c ailist/ailist.c -o build/temp.linux-x86_64-3.6/ailist/ailist.o -O2
  ailist/ailist.c:30:20: fatal error: Python.h: No such file or directory
   #include "Python.h"
                      ^
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for ailist
  Running setup.py clean for ailist
Failed to build ailist
Installing collected packages: ailist
    Running setup.py install for ailist ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6yj7p0mp/ailist/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6yj7p0mp/ailist/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-byvxvsll/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/thanhnguyen/.local/include/python3.6m/ailist
         cwd: /tmp/pip-install-6yj7p0mp/ailist/
    Complete output (24 lines):
    build configuration selected: optimized
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/ailist
    copying ailist/__init__.py -> build/lib.linux-x86_64-3.6/ailist
    copying ailist/ailist.pxd -> build/lib.linux-x86_64-3.6/ailist
    copying ailist/ailist.pyx -> build/lib.linux-x86_64-3.6/ailist
    copying ailist/ailist.c -> build/lib.linux-x86_64-3.6/ailist
    copying ailist/radix_interval_sort.c -> build/lib.linux-x86_64-3.6/ailist
    copying ailist/augmented_interval_list.c -> build/lib.linux-x86_64-3.6/ailist
    copying ailist/augmented_interval_list.h -> build/lib.linux-x86_64-3.6/ailist
    running build_ext
    building 'ailist.ailist' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/ailist
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -Iailist -I. -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include/python3.6m -c ailist/ailist.c -o build/temp.linux-x86_64-3.6/ailist/ailist.o -O2
    ailist/ailist.c:30:20: fatal error: Python.h: No such file or directory
     #include "Python.h"
                        ^
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I checked gcc --version and see that it's already installed (v5.5) What have gone wrong in my case?

Do you have numpy and pandas installed as well?

Yes, I have both of them installed

Can you let me know the version of Python, numpy, cython, and pandas that you were using so I can try and reproduce the error?