Closed arianccbasile closed 5 years ago
Hi, this looks similar to issues we observed in cobrapy when installing the conda version of cobrapy. Could you walk me through how you installed cobrapy?
With conda, the following seems to work:
conda create -n micom-py3 "python>=3.6" pandas tqdm
source activate micom-py3
pip install micom
Which seems to give a working micom:
(micom-py3) ~ python
Python 3.7.1 | packaged by conda-forge | (default, Mar 13 2019, 05:40:40)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import micom
>>> tax = micom.data.test_taxonomy()
>>> com = micom.Community(tax)
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:00<00:00, 5.03models/s]
>>> com.optimize()
<CommunitySolution 0.874 at 0x119abf048>
>>>
Hope that helps
I solved with this.
pip install -U swiglpk optlang
pip install optlang==1.4.2
Actually I am on python2.7, do you recommend the other?
Sincerely, Arianna Basile
Thanks for the update. micom
works with Python 2 and 3 for now. This will only affect other dependencies such as pandas that have already dropped Python 2 support.
while import micom version 0.9.2 I got the following ImportError. Any suggestion to solve it?
Sincerely, Arianna Basile
ImportError Traceback (most recent call last) /mnt/data_SSD/anaconda3/envs/flux_balance/lib/python3.6/site-packages/swiglpk/swiglpk.py in swig_import_helper() 13 try: ---> 14 return importlib.import_module(mname) 15 except ImportError:
/mnt/data_SSD/anaconda3/envs/flux_balance/lib/python3.6/importlib/init.py in import_module(name, package) 125 level += 1 --> 126 return _bootstrap._gcd_import(name[level:], package, level) 127
/mnt/data_SSD/anaconda3/envs/flux_balance/lib/python3.6/importlib/_bootstrap.py in _gcd_import(name, package, level)
/mnt/data_SSD/anaconda3/envs/flux_balance/lib/python3.6/importlib/_bootstrap.py in _find_andload(name, import)
/mnt/data_SSD/anaconda3/envs/flux_balance/lib/python3.6/importlib/_bootstrap.py in _find_and_loadunlocked(name, import)
/mnt/data_SSD/anaconda3/envs/flux_balance/lib/python3.6/importlib/_bootstrap.py in _load_unlocked(spec)
/mnt/data_SSD/anaconda3/envs/flux_balance/lib/python3.6/importlib/_bootstrap.py in module_from_spec(spec)
/mnt/data_SSD/anaconda3/envs/flux_balance/lib/python3.6/importlib/_bootstrap_external.py in create_module(self, spec)
/mnt/data_SSD/anaconda3/envs/flux_balance/lib/python3.6/importlib/_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)
ImportError: libglpk.so.40: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
ModuleNotFoundError Traceback (most recent call last)