lopatovsky/HMMs

Cython "include_dirs" option causing installation error

AkshayPeshave opened this issue · 7 comments

Installation using pip throws the following error. It seems to be caused by the include_dirs option of Cython.

Collecting hmms
  Downloading hmms-0.1.tar.gz (412kB)
    100% |████████████████████████████████| 419kB 2.1MB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-6_n03aco/hmms/setup.py", line 22, in <module>
        ext_modules=cythonize(glob.glob('hmms/*.pyx'), language_level=3, include_dirs=[numpy.get_include()]),
      File "/usr/local/lib/python3.5/dist-packages/Cython/Build/Dependencies.py", line 909, in cythonize
        c_options = CompilationOptions(**options)
      File "/usr/local/lib/python3.5/dist-packages/Cython/Compiler/Main.py", line 559, in __init__
        raise ValueError(message)
    ValueError: got unknown compilation option, please remove: include_dirs
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-6_n03aco/hmms/

VERSION INFO:
Python 3.5.2
Cython==0.27.1
numpy==1.13.3

Upon downloading the source code from the github repo and changing line 22 of setup.py to either

  1. ext_modules=cythonize(glob.glob('hmms/*.pyx'), language_level=3, include_path=[numpy.get_include()])
  2. ext_modules=cythonize(glob.glob('hmms/*.pyx'), language_level=3)

works and hmms installs fine.

Using version 0.25.2 of cython also worked for me.

I downgraded cython, did pip install -e after following @axxe-git 's instructions, and made sure I have all the dependencies. I get a segfault whenever I try to import hmms

@axxe-git proposition solved the problem for me

Thanks @axxe-git, I have changed the code according your suggestion.(cfdd1a0)

Hello I made the suggested changes but it is still not working.

For everyone who trying to install it:
I hade same issues and reinstalling using github helped me:
python -m pip install git+https://github.com/lopatovsky/HMMs