Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'cobra.core.model' in python3 #580

Closed
Biomathsys opened this issue May 3, 2017 · 3 comments
Closed

Comments

@Biomathsys
Copy link

I am new in working python.
I'm working with this code, but unfortunately, I see this error
"
ModuleNotFoundError Traceback (most recent call last)
in ()
10 from six import iteritems
11
---> 12 from cobra.core.model import Model
13
14

ModuleNotFoundError: No module named 'cobra.core.model'
"

Does anyone experience this error?

-- coding: utf-8 --

from future import absolute_import

from sys import maxsize
from warnings import warn

from numpy import array, ndarray
from scipy.sparse import dok_matrix, lil_matrix
from six import iteritems

from cobra.core.model import Model

class ArrayBasedModel(Model):
"""ArrayBasedModel is a class that adds arrays and vectors to
a cobra.Model to make it easier to perform linear algebra operations.

"""

def __init__(self, description=None, deepcopy_model=False,
             matrix_type='scipy.lil_matrix'):
    """
    description: None | String | cobra.Model

    deepcopy_model: Boolean.  If True and description is
    a cobra.Model then make a deepcopy of the Model before
    creating the ArrayBasedModel.

    matrix_type: 'scipy.lil_matrix' or 'scipy.dok_matrix'
        Specifies which type of backend matrix to use for S.

    """
    warn("ArrayBasedModel is deprecated, use "
         "`cobra.util.array.create_stoichiometric_matrix` instead",
         DeprecationWarning)

    if deepcopy_model and isinstance(description, Model):
        description = description.copy()
    Model.__init__(self, description)
    self._S = None
    self.matrix_type = matrix_type
    self.update()

# no setter for S at the moment
@property
def S(self):
    """Stoichiometric matrix of the model

    This will be formatted as either :class:`~scipy.sparse.lil_matrix`
    or :class:`~scipy.sparse.dok_matrix`

    """
    return self._S
@cgoldberg
Copy link
Member

I have no idea what the code is that you posted or what you are doing. how is this related to Locust?

@Biomathsys
Copy link
Author

@cgoldberg
Copy link
Member

I'm closing this issue since it is completely unrelated to this project and I have no idea why it was posted here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants