sys-bio / roadrunner

libRoadRunner: A high-performance SBML simulator
http://libroadrunner.org/
Other
39 stars 24 forks source link

Include ncurses with rr release on linux #651

Open Karrenbelt opened 4 years ago

Karrenbelt commented 4 years ago

I setup an empty virtual environment using python3.7 and installed libroadrunner, but I get an error on import. I'm using Ubuntu 19.10

➜ test git:(master) ✗ python3.7 -m venv venv ➜ test git:(master) ✗ source venv/bin/activate (venv) ➜ test git:(master) ✗ pip install libroadrunner Collecting libroadrunner Using cached https://files.pythonhosted.org/packages/36/b4/dbddd02810a1d5898bdb18ecffa9c03829aa757554be02e8a46776bd2cb0/libroadrunner-1.6.0-cp37-cp37m-manylinux1_x86_64.whl Collecting numpy>=1.12 (from libroadrunner) Using cached https://files.pythonhosted.org/packages/b4/93/76311932b0c7efd3111f6604609f36d568b912e16bebd86d99f0612d3930/numpy-1.19.0-cp37-cp37m-manylinux1_x86_64.whl Installing collected packages: numpy, libroadrunner Successfully installed libroadrunner-1.6.0 numpy-1.19.0 (venv) ➜ test git:(master) ✗ python Python 3.7.5 (default, Apr 19 2020, 20:18:17) [GCC 9.2.1 20191008] on linux Type "help", "copyright", "credits" or "license" for more information.

import sys sys.version '3.7.5 (default, Apr 19 2020, 20:18:17) \n[GCC 9.2.1 20191008]' import roadrunner Traceback (most recent call last): File "/home/repositories/test/venv/lib/python3.7/site-packages/roadrunner/roadrunner.py", line 17, in swig_import_helper return importlib.import_module(mname) File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 670, in _load_unlocked File "", line 583, in module_from_spec File "", line 1043, in create_module File "", line 219, in _call_with_frames_removed ImportError: libncurses.so.5: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/repositories/test/venv/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3343, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 1, in import roadrunner File "/snap/pycharm-professional/201/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import module = self._system_import(name, *args, kwargs) File "/home/repositories/test/venv/lib/python3.7/site-packages/roadrunner/init.py", line 10, in from .roadrunner import File "/snap/pycharm-professional/201/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import module = self._system_import(name, args, kwargs) File "/home/repositories/test/venv/lib/python3.7/site-packages/roadrunner/roadrunner.py", line 20, in _roadrunner = swig_import_helper() File "/home/repositories/test/venv/lib/python3.7/site-packages/roadrunner/roadrunner.py", line 19, in swig_import_helper return importlib.import_module('_roadrunner') File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) ModuleNotFoundError: No module named '_roadrunner'

matthiaskoenig commented 4 years ago

Hi @Karrenbelt,

this is a common error I see on clean linux machines. Roadrunner requires the libncurses library installed on the system. This is not packaged as part of libroadrunner. Installing libncurses will solve the issue. See for instance https://www.cyberciti.biz/faq/linux-install-ncurses-library-headers-on-debian-ubuntu-centos-fedora/

@hsauro @luciansmith Any chance this can be packaged with roadrunner? Often users do not have admin rights on workstations so installing a system library can be problematic whereas a pip install normally works in user space.

Best Matthias

hsauro commented 4 years ago

Yes agree, we heard about his also from another group this morning.

Herbert

On Mon, Jul 6, 2020 at 2:27 PM Matthias König notifications@github.com wrote:

Hi @Karrenbelt https://github.com/Karrenbelt,

this is a common error I see on clean linux machines. Roadrunner requires the libncurses library installed on the system. This is not packaged as part of libroadrunner. Installing libncurses will solve the issue. See for instance https://www.cyberciti.biz/faq/linux-install-ncurses-library-headers-on-debian-ubuntu-centos-fedora/

@hsauro https://github.com/hsauro @luciansmith https://github.com/luciansmith Any chance this can be packaged with roadrunner? Often users do not have admin rights on workstations so installing a system library can be problematic whereas a pip install normally works in user space.

Best Matthias

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sys-bio/roadrunner/issues/651#issuecomment-654474267, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIBSDRKOWUO2GHCFAQAT6TR2I6TTANCNFSM4ORTZKXQ .

-- Herbert Sauro, Professor University of Washington, Bioengineering 206-685-2119, www.sys-bio.org hsauro@uw.edu Books: http://books.analogmachine.org/

luciansmith commented 2 years ago

Changed the issue: we should see if we can include ncurses with the linux release (perhaps by statically linking it?)