For installation help, please use the Google Group. For usage instructions, please see the documentation.
We only test against Python 3.6+, however, Python 3.4 or higher and even 2.7 should work mostly. For Windows users and possibly also Mac OS users, we recommend using the Anaconda Python distribution.
COBRApy can be installed with any recent installation of pip. Instructions for several operating systems are below:
- We highly recommend that you create a Python virtual environment.
- Install COBRApy when an environment is active by running
pip install cobra
in the terminal.
If you heed our recommendation to use Anaconda, you can open an Anaconda shell
and install COBRApy from the bioconda
channel. Soon it should also be
available from the conda-forge
channel.
conda install -c bioconda cobra
Get the detailed contribution instructions for contributing to COBRApy.
COBRApy uses optlang to interface the mathematical solvers used to optimize the created COBRA models. At the time of writing the supported solvers are:
- ILOG/CPLEX (available with Academic and Commercial licenses)
- Gurobi
- GLPK which is automatically installed as swiglpk