Unable To Install cobra py on Mac with M1 chip

128 views
Skip to first unread message

Annie Wang

unread,
Jan 5, 2022, 12:11:55 PM1/5/22
to cobra pie
Hello all,

I've been running into a lot of problems trying to install cobra on my M1-chip Mac.  

1. I've tried using pip install but it has failed each time, giving me errors on libsbml and some other default libraries.  

2. I've also tried to install anaconda and install cobra that way, but it ended up giving me error messages of how the constraints are clashing (I have python 3.8.9 and I installed anaconda 4.11).

Right now I'm out of ideas as to how to proceed; as a last resort I might try installing Matlab but not sure if it is worth it.  Any ideas or help would be greatly appreciated.

Thank you! 

Moritz Beber

unread,
Jan 5, 2022, 1:19:44 PM1/5/22
to cobr...@googlegroups.com
Hi Annie,

I suspect that there are no wheels (or conda package) for the M1 architecture and thus pip is trying to compile libsbml from sources for which you are missing dependencies. It's impossible to tell without seeing the actual errors. I suggest as a first step that you open an issue about this at https://github.com/sbmlteam/python-libsbml/issues/new

Best,
Moritz
--
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/1ede6f85-a72c-422d-80fc-1496ac651528n%40googlegroups.com.

ch.d...@gmail.com

unread,
Jan 12, 2022, 5:37:35 PM1/12/22
to cobra pie
Installing conda under Rosetta2 should work for now. Silicon (M1) is an ARM architecture and many packages can currently not be compiled there easily, so it will probably take a while until everything has been migrated (I would at least a year). Any of the matlab extensions/toolboxes need to be compiled as well so you may run into similar issue unless you install it with Rosetta2.

Sorry that this has no simple solution :/

Best

ch.d...@gmail.com

unread,
Mar 21, 2022, 5:48:03 PM3/21/22
to cobra pie
Some good news here. Swiglpk and libsbml now have wheels for silicon. So cobrapy should be installable on M1 Macs with pip now. I am still trying to get it to work on conda as well.
Reply all
Reply to author
Forward
0 new messages