Solved: SUNSPGMR undefined scikits.odes on python 3.10?
I'm on Arch linux, installed Sundials 5.1.0, scikits.odes version 2.6.3. But I get: ImportError: /usr/lib/python3.10/site-packages/scikits/odes/sundials/ida.cpython-310-x86_64-linux-gnu.so: undefined symbol: SUNSPGMR when I try to create a solver with the name 'ida'. Also if I do
import scikits.odes.sundials.ida as ida
I get the same error. I ran
make test
and 100% passed. I also did:
import scikits.odes as od od.test()
And I get:
Running unit tests for scikits.odes NumPy version 1.22.3 NumPy relaxed strides checking option: True NumPy is installed in /usr/lib/python3.10/site-packages/numpy Python version 3.10.4 (main, Mar 23 2022, 23:05:40) [GCC 11.2.0] nose version 1.3.7 /usr/lib/python3.10/site-packages/numpy/distutils/ccompiler.py:8: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives from distutils import ccompiler /usr/lib/python3.10/site-packages/numpy/distutils/ccompiler.py:17: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead from distutils.sysconfig import customize_compiler Traceback (most recent call last): File "
", line 1, in File "/usr/lib/python3.10/site-packages/numpy/testing/_private/nosetester.py", line 461, in test t = NumpyTestProgram(argv=argv, exit=False, plugins=plugins) File "/home/paul/.local/lib/python3.10/site-packages/nose/core.py", line 118, in init unittest.TestProgram.init( File "/usr/lib/python3.10/unittest/main.py", line 100, in init self.parseArgs(argv) File "/home/paul/.local/lib/python3.10/site-packages/nose/core.py", line 179, in parseArgs self.createTests() File "/home/paul/.local/lib/python3.10/site-packages/nose/core.py", line 193, in createTests self.test = self.testLoader.loadTestsFromNames(self.testNames) File "/home/paul/.local/lib/python3.10/site-packages/nose/loader.py", line 481, in loadTestsFromNames return unittest.TestLoader.loadTestsFromNames(self, names, module) File "/usr/lib/python3.10/unittest/loader.py", line 220, in loadTestsFromNames suites = [self.loadTestsFromName(name, module) for name in names] File "/usr/lib/python3.10/unittest/loader.py", line 220, in suites = [self.loadTestsFromName(name, module) for name in names] File "/home/paul/.local/lib/python3.10/site-packages/nose/loader.py", line 431, in loadTestsFromName return self.loadTestsFromModule( File "/home/paul/.local/lib/python3.10/site-packages/nose/loader.py", line 354, in loadTestsFromModule tests.extend(self.loadTestsFromDir(module_path)) File "/home/paul/.local/lib/python3.10/site-packages/nose/loader.py", line 191, in loadTestsFromDir yield self.loadTestsFromName( File "/home/paul/.local/lib/python3.10/site-packages/nose/loader.py", line 431, in loadTestsFromName return self.loadTestsFromModule( File "/home/paul/.local/lib/python3.10/site-packages/nose/loader.py", line 359, in loadTestsFromModule return self.suiteClass(ContextList(tests, context=module)) File "/home/paul/.local/lib/python3.10/site-packages/nose/suite.py", line 428, in call return self.makeSuite(tests, context, **kw) File "/home/paul/.local/lib/python3.10/site-packages/nose/suite.py", line 475, in makeSuite suite = self.suiteClass( File "/home/paul/.local/lib/python3.10/site-packages/nose/suite.py", line 159, in init super(ContextSuite, self).init(tests) File "/home/paul/.local/lib/python3.10/site-packages/nose/suite.py", line 53, in init super(LazySuite, self).init() File "/usr/lib/python3.10/unittest/suite.py", line 22, in init self._tests = [] File "/home/paul/.local/lib/python3.10/site-packages/nose/suite.py", line 106, in _set_tests if isinstance(tests, collections.Callable) and not is_suite: AttributeError: module 'collections' has no attribute 'Callable'
solved: due to an installation of octave I had a more recent version of sundials installed. had to do:
sudo pip uninstall scikits.odes sudo python -m pip cache purge export SUNDIALS_INST=/usr/local sudo -E pip install scikits.odes