You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ImportError: Failed to import test module: tests.test_libmadam
Traceback (most recent call last):
File "/home/esteban/libmadam-master/python/libmadam_wrapper/init.py", line 28, in
_madam = ct.CDLL("libmadam.so")
File "/usr/lib/python3.6/ctypes/init.py", line 348, in init
self._handle = _dlopen(self._name, mode)
OSError: libmadam.so: 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 "/usr/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
module = self._get_module_from_name(name)
File "/usr/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name import(name)
File "/home/esteban/libmadam-master/python/tests/test_libmadam.py", line 19, in
import libmadam_wrapper as madam
File "/home/esteban/libmadam-master/python/libmadam_wrapper/init.py", line 32, in
_madam = ct.CDLL(path)
File "/usr/lib/python3.6/ctypes/init.py", line 348, in init
self._handle = _dlopen(self._name, mode)
OSError: libmadam.so.0: cannot open shared object file: No such file or directory
ImportError: Failed to import test module: tests.test_libmadam_mc
Traceback (most recent call last):
File "/home/esteban/libmadam-master/python/libmadam_wrapper/init.py", line 28, in
_madam = ct.CDLL("libmadam.so")
File "/usr/lib/python3.6/ctypes/init.py", line 348, in init
self._handle = _dlopen(self._name, mode)
OSError: libmadam.so: 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 "/usr/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
module = self._get_module_from_name(name)
File "/usr/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name import(name)
File "/home/esteban/libmadam-master/python/tests/test_libmadam_mc.py", line 19, in
import libmadam_wrapper as madam
File "/home/esteban/libmadam-master/python/libmadam_wrapper/init.py", line 32, in
_madam = ct.CDLL(path)
File "/usr/lib/python3.6/ctypes/init.py", line 348, in init
self._handle = _dlopen(self._name, mode)
OSError: libmadam.so.0: cannot open shared object file: No such file or directory
Ran 2 tests in 0.000s
FAILED (errors=2)
How do i fix this?
Thank you in advance.
The text was updated successfully, but these errors were encountered:
@echalbau, when python or any program uses the linker to load a shared library, it looks in specific system locations and also in user-defined locations specified (on linux) by the LD_LIBRARY_PATH environment variable. When you install madam you need to choose where you are installing the software and then make sure that this install prefix is in your default search paths. For example, if you install to /home/user/blah, then typically you would do (assuming you use a Bourne-compatible shell):
export PATH=/home/user/blah/bin:$PATH
export LD_LIBRARY_PATH=/home/user/blah/lib:$LD_LIBRARY_PATH
export PYTHONPATH=/home/user/blah/lib/python3.X/site-packages:$PYTHONPATH
(where "X" in the previous line depends on your python version)
Manipulating your shell environment is much more general than installing libmadam, and there are many resources on the internet that are more informative than what I can write here. Whenever you compile and install software to a non-standard location you will have to manipulate your shell environment somehow to find executables, libraries, and python packages.
Dear all, when i try to run the python test i get the following output (after an apparently successful installation):
sudo python3 setup.py test
running test
tests.test_libmadam (unittest.loader._FailedTest) ... ERROR
tests.test_libmadam_mc (unittest.loader._FailedTest) ... ERROR
======================================================================
ERROR: tests.test_libmadam (unittest.loader._FailedTest)
ImportError: Failed to import test module: tests.test_libmadam
Traceback (most recent call last):
File "/home/esteban/libmadam-master/python/libmadam_wrapper/init.py", line 28, in
_madam = ct.CDLL("libmadam.so")
File "/usr/lib/python3.6/ctypes/init.py", line 348, in init
self._handle = _dlopen(self._name, mode)
OSError: libmadam.so: 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 "/usr/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
module = self._get_module_from_name(name)
File "/usr/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
import(name)
File "/home/esteban/libmadam-master/python/tests/test_libmadam.py", line 19, in
import libmadam_wrapper as madam
File "/home/esteban/libmadam-master/python/libmadam_wrapper/init.py", line 32, in
_madam = ct.CDLL(path)
File "/usr/lib/python3.6/ctypes/init.py", line 348, in init
self._handle = _dlopen(self._name, mode)
OSError: libmadam.so.0: cannot open shared object file: No such file or directory
======================================================================
ERROR: tests.test_libmadam_mc (unittest.loader._FailedTest)
ImportError: Failed to import test module: tests.test_libmadam_mc
Traceback (most recent call last):
File "/home/esteban/libmadam-master/python/libmadam_wrapper/init.py", line 28, in
_madam = ct.CDLL("libmadam.so")
File "/usr/lib/python3.6/ctypes/init.py", line 348, in init
self._handle = _dlopen(self._name, mode)
OSError: libmadam.so: 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 "/usr/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
module = self._get_module_from_name(name)
File "/usr/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
import(name)
File "/home/esteban/libmadam-master/python/tests/test_libmadam_mc.py", line 19, in
import libmadam_wrapper as madam
File "/home/esteban/libmadam-master/python/libmadam_wrapper/init.py", line 32, in
_madam = ct.CDLL(path)
File "/usr/lib/python3.6/ctypes/init.py", line 348, in init
self._handle = _dlopen(self._name, mode)
OSError: libmadam.so.0: cannot open shared object file: No such file or directory
Ran 2 tests in 0.000s
FAILED (errors=2)
How do i fix this?
Thank you in advance.
The text was updated successfully, but these errors were encountered: