Need help with CobraPy installation! (New to python and cobrapy)

731 views
Skip to first unread message

Yiming Yang

unread,
Jan 29, 2022, 6:13:04 AM1/29/22
to cobra pie
Hello,
Could anyone provide me a step-to-step instruction on how to install CobraPy? 
I've installed python and downloaded a folder called "cobra-0.23.0.tar.gz" from https://pypi.org/project/cobra/#files, but I have no idea how to install it.
I tried double-clicking on the setup.py file in that folder, but nothing happened : (
Capture.JPG
I would be grateful if anyone could help me with this.
Thanks in advance

Dennis van den Berg

unread,
Jan 29, 2022, 9:14:42 AM1/29/22
to Yiming Yang, cobra pie
Dear Yiming Yang,

You do not need to download cobrapy. Just use pip or conda (depending on how you installed python) but install.rst explains it all.

Good luck,

Dennis

--
You received this message because you are subscribed to the Google Groups "cobra pie" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cobra-pie+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cobra-pie/9b75357d-1ec9-4014-b10a-d1f7cca1bb1cn%40googlegroups.com.

Yiming Yang

unread,
Jan 29, 2022, 12:35:41 PM1/29/22
to cobra pie
Thank you Dennis,

I'll take a look at the instructions :D

Regards,
Yiming

Stephen Chapman

unread,
Feb 8, 2022, 10:10:06 AM2/8/22
to cobra pie
pip install worked great for me!

valeria ansaldo saavedra

unread,
Apr 12, 2022, 3:59:23 PM4/12/22
to cobra pie
after installing cobra py with pip, how can i install and use escher with the cobrapy? please

bs22

unread,
Apr 20, 2022, 2:59:03 PM4/20/22
to cobra pie
Here are the step by step codes to install cobrapy and other useful packages:
  1. python3 -m venv cobrapy (create environment)
  2. source cobrapy/bin/activate (activate environment)
  3. python -m pip install cobra (install cobrapy)
  4. python -m pip install escher (install escher)
  5. python -m pip install plotly (install plotly)
  6. python -m pip install matplotlib (install matplot)
  7. python -m pip install -e git+https://github.com/biosustain/cameo.git@devel#egg=cameo (install cameo)
Cheers!

BS

valeria ansaldo saavedra

unread,
Apr 23, 2022, 8:04:53 PM4/23/22
to cobra pie
Thank you very much! Can you help me with something else? I opened a model in Cobrapy, in Json format. Im able to see the model but what i want to do is to add new reactions to simulate a new metabolic route that uses alginate as carbon source for the production of a biofuel metabolite. What do you reccomend or could you help me? Thanks in advance
Valeria

Dennis van den Berg

unread,
Apr 24, 2022, 1:56:06 AM4/24/22
to valeria ansaldo saavedra, cobra pie
Hi Valeria,

Did you check https://cobrapy.readthedocs.io/en/latest/ yet? In chapter two the addition of new metabolites and reactions are explained.
There is also a readthedocs.io for Escher.
Tip: For the naming of metabolites and selecting the correct formulas: Search the database used by your original model for any new metabolites and reactions you want to add.

Good luck with your modelling,

Dennis

valeria ansaldo saavedra

unread,
Apr 25, 2022, 10:38:57 AM4/25/22
to cobra pie
Thank you so much Dennis,
Yes I checked the documentation but it is sometimes a bit complicated for me to understand. So in chapter two, the same instructions work for existing models for example, I downloaded a Json model from Bigg and opened in cobrapy, i just do the same as described in chapter two? But how do I use the Model.get_by_id in this case? 
Thank you so much for your help again,
Valeria
Reply all
Reply to author
Forward
0 new messages