-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to run test in the python wrapper #12
Comments
Is libmadam.so installed in a directory on your LD_LIBRARY_PATH? |
I am not sure, how do i check that? |
@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
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: