EPFL-LCSB / skimpy

Symbolic Kinetic Models with Python
Apache License 2.0
30 stars 14 forks source link

Skimpy.nullspace module missing #10

Closed PHvanLent closed 2 years ago

PHvanLent commented 2 years ago

Dear developers,

I came accross this package and this is exactly what I need for making models, so first of all thank you!

However, when trying to use the package it seems that skimpy.nullspace is missing. I get the following error when trying to do the simple example provided on the readme:

47 from skimpy.nullspace import left_integer_nullspace 48 49 from ...utils.namespace import *

ModuleNotFoundError: No module named 'skimpy.nullspace'.

I was wondering what I am exactly doing wrong when installing the module.

Kind regards,

Paul

weilandtd commented 2 years ago

Hey Paul, can you tell me how you installed the package? Did you get any error code upon installation?

I think the issue is related that it is currently is crucial you install cython before the you install the package. Because the nullspace module is a cython module to find a left integer nullspace using the C++ flint libary.

PHvanLent commented 2 years ago

Thank you for the response. I already have installed cython beforehand. It is not an error thrown during the installation of the package, but rather when importing:

Code: from skimpy.core import from skimpy.mechanisms import

Error: _--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last)

in 1 import cython 2 import numpy as np ----> 3 from skimpy.core import * 4 from skimpy.mechanisms import * ~\anaconda3\lib\site-packages\skimpy\core\__init__.py in 26 """ 27 ---> 28 from .kinmodel import KineticModel 29 from .modifiers import * 30 from .reactions import Reaction ~\anaconda3\lib\site-packages\skimpy\core\kinmodel.py in 31 from skimpy.analysis.ode.symbolic_jacobian_fun import SymbolicJacobianFunction 32 ---> 33 from skimpy.analysis.mca.make import make_mca_functions 34 from skimpy.analysis.mca.prepare import prepare_mca 35 from skimpy.analysis.mca import * ~\anaconda3\lib\site-packages\skimpy\analysis\mca\__init__.py in 27 28 from .jacobian_fun import * ---> 29 from .concentration_control_fun import * 30 from .flux_control_fun import * ~\anaconda3\lib\site-packages\skimpy\analysis\mca\concentration_control_fun.py in 35 from skimpy.utils.tensor import Tensor 36 from skimpy.utils.namespace import SPLIT, NET ---> 37 from skimpy.analysis.mca.utils import get_reversible_fluxes 38 39 class ConcentrationControlFunction: ~\anaconda3\lib\site-packages\skimpy\analysis\mca\utils.py in 45 from skimpy.utils.namespace import * 46 ---> 47 from skimpy.nullspace import left_integer_nullspace 48 49 from ...utils.namespace import * ModuleNotFoundError: No module named 'skimpy.nullspace'_ It seems like there should be a module skimpy.nullspace that gets called in the core module that is not there.
PHvanLent commented 2 years ago

Thank you for the response. I already have installed cython beforehand. It is not an error thrown during the installation of the package, but rather when importing:

Code: from skimpy.core import from skimpy.mechanisms import

Error: _--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last)

in 1 import cython 2 import numpy as np ----> 3 from skimpy.core import * 4 from skimpy.mechanisms import * ~\anaconda3\lib\site-packages\skimpy\core\__init__.py in 26 """ 27 ---> 28 from .kinmodel import KineticModel 29 from .modifiers import * 30 from .reactions import Reaction ~\anaconda3\lib\site-packages\skimpy\core\kinmodel.py in 31 from skimpy.analysis.ode.symbolic_jacobian_fun import SymbolicJacobianFunction 32 ---> 33 from skimpy.analysis.mca.make import make_mca_functions 34 from skimpy.analysis.mca.prepare import prepare_mca 35 from skimpy.analysis.mca import * ~\anaconda3\lib\site-packages\skimpy\analysis\mca\__init__.py in 27 28 from .jacobian_fun import * ---> 29 from .concentration_control_fun import * 30 from .flux_control_fun import * ~\anaconda3\lib\site-packages\skimpy\analysis\mca\concentration_control_fun.py in 35 from skimpy.utils.tensor import Tensor 36 from skimpy.utils.namespace import SPLIT, NET ---> 37 from skimpy.analysis.mca.utils import get_reversible_fluxes 38 39 class ConcentrationControlFunction: ~\anaconda3\lib\site-packages\skimpy\analysis\mca\utils.py in 45 from skimpy.utils.namespace import * 46 ---> 47 from skimpy.nullspace import left_integer_nullspace 48 49 from ...utils.namespace import * ModuleNotFoundError: No module named 'skimpy.nullspace'_ It seems like there should be a module skimpy.nullspace that gets called in the core module that is not there.
weilandtd commented 2 years ago

It seems like there should be a module skimpy.nullspace that gets called in the core module that is not there.

Yes but this module is created upon installation since the the nullspace module is a cython extension using functions from the flint library. So it not being there means that it was not compiled upon installation.

You can see the instructions sent to the compiler on installation in the setup file here.

To work this issue out could you let me know: 1) Which operating system are you using? 2) Did you install the package directly or are you using the docker container? 3) If you installed it directly could you post all the output of pip?

Thank you in advance for your help!

weilandtd commented 2 years ago

You can now find a conda installation package https://github.com/EPFL-LCSB/skimpy/releases/tag/v1.0.0

See also update installation instructions: https://github.com/EPFL-LCSB/skimpy