biosustain / cameo

cameo - computer aided metabolic engineering & optimization
http://cameo.bio
Apache License 2.0
114 stars 44 forks source link

cannot import name 'find_gene_knockout_reactions' #297

Closed jetu20 closed 2 years ago

jetu20 commented 2 years ago

Hi I am trying to to run following command from tutorial but it gives me following error.......any suggestion to solve it

from cameo.strain_design import OptGene image

ImportError: cannot import name 'find_gene_knockout_reactions' from 'cobra.manipulation.delete' (C:\Users\jetu20\Anaconda3\envs\GEM-CAMEO\lib\site-packages\cobra\manipulation\delete.py)

carrascomj commented 2 years ago

It seems like find_gene_knockout_reactions has been removed from cobra.manipulation.delete.

You can try downgrading cobrapy to a lower version. If you are using pip:

pip install cobra==0.20.0 --upgrade

But it may cause problems with libSBML, depending on your python version. Cameo should probably pin cobra to avoid this kind of issues.

jetu20 commented 2 years ago

thanks @carrascomj for your suggestion and it solve the issues