Skip to content

'lpsolve.pxd' not found in clara/pylpsolve.pyx #34

Description

@LioTree

I encountered this problem while running make on Ubuntu 20.04 with Python 3.8.10:

Error compiling Cython file:
------------------------------------------------------------
...
from array import array
from cpython cimport array as c_array
from libc.stdio cimport stdout, stderr


cimport lpsolve
        ^
------------------------------------------------------------

clara/pylpsolve.pyx:10:8: 'lpsolve.pxd' not found

This is because the default search path for cimport does not include ./clara/. It needs to be manually added to the search path.

Line 18 of setup.py needs to be changed to:

ext_modules = cythonize(extensions, include_path=["./clara"]),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions