cobra.io.mat mat.py numpy import object error - RESOLVED

32 views
Skip to first unread message

norm vinson

unread,
May 11, 2023, 4:40:36 PM5/11/23
to cobra pie
version 1.24.3 of numpy  leads to an error when tryinlg to import cobra.

File ~\Anaconda3\lib\site-packages\cobra\io\mat.py:13, in <module> 10 from warnings import warn 12 from numpy import array, inf, isinf ---> 13 from numpy import object as np_object 15 from cobra.core import Metabolite, Model, Reaction 16 from cobra.util import create_stoichiometric_matrix ImportError: cannot import name 'object' from 'numpy' (C:\Users\vinsonn\Anaconda3\lib\site-packages\numpy\__init__.py)
# packages in environment at C:\Users\vinsonn\Anaconda3: # # Name Version Build Channel numpy 1.24.3 py38h1d91fd2_0 conda-forge numpydoc 1.5.0 pyhd8ed1ab_0 conda-forge
You need to roll back numpy to v1.23.5. At the conda command prompt, type:

> conda install "numpy<1.24"

Then restart your jupyter kernels, and you should be good.
Thanks to The Chandra X-Ray Center (CXC) for reporting the solution to the same problem with their software.

Reply all
Reply to author
Forward
0 new messages