sys-bio / tellurium

Python Environment for Modeling and Simulating Biological Systems
http://tellurium.analogmachine.org/
Apache License 2.0
110 stars 36 forks source link

installation issue #568

Closed Pellarin closed 1 year ago

Pellarin commented 1 year ago

hello,

I created a conda environment with:

conda create --name "tellurium" python=3.6.9

within the environment I just

pip install tellurium

The installation freezes at Building wheel for python-libsbml (setup.py) ... /

after producing a bunch of warning/errors such as:

  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/rpellarin/.conda/envs/tellurium/bin/python3.6 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2kxjmeha/python-libsedml_6c9e1531903549a28528873a626b4356/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2kxjmeha/python-libsedml_6c9e1531903549a28528873a626b4356/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-as7ucjsc
       cwd: /tmp/pip-install-2kxjmeha/python-libsedml_6c9e1531903549a28528873a626b4356/
  Complete output (8 lines):
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-2kxjmeha/python-libsedml_6c9e1531903549a28528873a626b4356/setup.py", line 117, in <module>
      raise ValueError("Invalid libSedML Source directory, no VERSION.txt file")
  ValueError: Invalid libSedML Source directory, no VERSION.txt file
  Using libSedML from: /tmp/pip-install-2kxjmeha/python-libsedml_6c9e1531903549a28528873a626b4356
  Using VERSION.txt: /tmp/pip-install-2kxjmeha/python-libsedml_6c9e1531903549a28528873a626b4356/VERSION.txt
  ['PKG-INFO', 'python_libsedml.egg-info', 'setup.py', 'LICENSE.txt', 'setup.cfg', 'README.md']
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/97/0f/b49c2ee5d27aa7fa6d5aaccfc277e081840d4349f5c96348b46a0646b016/python-libsedml-2.0.32.tar.gz#sha256=7ea5f3b9625ec1513ea119ad00bc9eda42d3ea6b8f78bf57dbd201c690d44727 (from https://pypi.org/simple/python-libsedml/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Pellarin commented 1 year ago

After reading #562 I tried to do the following"

I deleted the "tellurium" conda environment above and created a new one with python 3.8

conda create --name "tellurium" python=3.8

within the environment I did

pip install libroadrunner==2.3.1 pip install tellurium

Everything install perfectly.

However if I run

import tellurium as te

I get the following:

Traceback (most recent call last):
  File "example.py", line 1, in <module>
    import tellurium as te
  File "/home/rpellarin/.conda/envs/tellurium/lib/python3.8/site-packages/tellurium/__init__.py", line 14, in <module>
    from .tellurium import (
  File "/home/rpellarin/.conda/envs/tellurium/lib/python3.8/site-packages/tellurium/tellurium.py", line 150, in <module>
    import roadrunner
  File "/home/rpellarin/.conda/envs/tellurium/lib/python3.8/site-packages/roadrunner/__init__.py", line 10, in <module>
    from .roadrunner import *
  File "/home/rpellarin/.conda/envs/tellurium/lib/python3.8/site-packages/roadrunner/roadrunner.py", line 15, in <module>
    from . import _roadrunner
ImportError: libncurses.so.5: cannot open shared object file: No such file or directory
fbergmann commented 1 year ago

Talking about the first error you received, since python 3.6 has reached end of life, I no longer create binary wheels for the combine libraries for python < 3.7. Unfortunately the source archive for python-libsedml was invalid, and could not be built. I'll create a new version for libsedml, to have a valid source archive.

as to the 2nd error, libcurses seems to be missing on your system, and would have to be installed (on debian with something like sudo apt-get install libncurses5 )

Pellarin commented 1 year ago

Thanks so much. In fact for the first question I was following

https://github.com/sys-bio/tellurium/wiki/FAQ#i-would-like-to-use-tellurium-on-anaconda-what-should-i-do

where it is mentioned to install python 3.6.9 in the Anaconda howto section.

luciansmith commented 1 year ago

Apologies for the out-of-date instructions! You no longer need to install Python 3.6; as Frank mentioned, 3.6 has been obsolete for some time now. Tellurium's dependencies rely on binary builds, and we generally provide those binaries for the latest three or four versions of Python--right now, that means we provide binaries for pythons 3.8 through 3.11. I would recommend using at least python 3.10 at this point.

I've updated the page you found to be a little more future-proof. Thanks for reporting the issue!

Pellarin commented 1 year ago

Thanks. Now it works perfectly.