If I install swig2.0.12(latest swig2) it works as expected. I have not tried with earlier versions of swig3.
If others have the same problem, releases of swig are found here: https://sourceforge.net/projects/swig/files/swig/
best,
Paw
Last edit: Paw 2017-07-24
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok. I tried to use swig 2.0. Did not work. I get the following set of error messages that I cannot (yet) decode...any help would be (much) appreciated.
Present limitation of Python: Cannot rebuild library
without exiting Python and deleting the shared library
/home/clasajacobson/Downloads/pydstool-master/examples/_dop853_my_ode_vf.so
by hand! If you made any changes to the system you should
not proceed with running the integrator until you quit
and rebuild.
Did not compile shared library.
Error in importing compiled vector field and integrator.
Did you compile the RHS C code?
Traceback (most recent call last):
File "dop853_temp/dop853_my_ode_vf.py", line 14, in swig_import_helper
return importlib.import_module(mname)
File "/usr/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap="">", line 994, in _gcd_import
File "<frozen importlib._bootstrap="">", line 971, in _find_and_load
File "<frozen importlib._bootstrap="">", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named '_dop853_my_ode_vf'</frozen></frozen></frozen>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Dopri_backwards_test.py", line 23, in <module>
trajf = ode.compute('testf')
File "/usr/local/lib/python3.6/dist-packages/PyDSTool-0.90.2-py3.6.egg/PyDSTool/Generator/Dopri_ODEsystem.py", line 463, in compute
extraSpace=self.algparams['extraspace'],
File "/usr/local/lib/python3.6/dist-packages/PyDSTool-0.90.2-py3.6.egg/PyDSTool/Generator/Dopri_ODEsystem.py", line 45, in init
modname, *imp.find_module(modname, ["dop853_temp"]))
File "/usr/lib/python3.6/imp.py", line 235, in load_module
return load_source(name, filename, file)
File "/usr/lib/python3.6/imp.py", line 172, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap="">", line 684, in _load
File "<frozen importlib._bootstrap="">", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external="">", line 678, in exec_module
File "<frozen importlib._bootstrap="">", line 219, in _call_with_frames_removed
File "dop853_temp/dop853_my_ode_vf.py", line 17, in <module>
_dop853_my_ode_vf = swig_import_helper()
File "dop853_temp/dop853_my_ode_vf.py", line 16, in swig_import_helper
return importlib.import_module('_dop853_my_ode_vf')
File "/usr/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap="">", line 994, in _gcd_import
File "<frozen importlib._bootstrap="">", line 971, in _find_and_load
File "<frozen importlib._bootstrap="">", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named '_dop853_my_ode_vf'
clasajacobson@clasajacobson-Oryx-Pro:~/Downloads/pydstool-master/examples$ </frozen></frozen></frozen></module></frozen></frozen></frozen></frozen></module>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear all,
I cannot get c-integrators to work with recent versions of swig.
I have tried with swig3.0.10 (debian strech included) and the latest swig3.0.12.
When I run
examples/Dopri_backwards_test.pyI get the errorIf I install swig2.0.12(latest swig2) it works as expected. I have not tried with earlier versions of swig3.
If others have the same problem, releases of swig are found here:
https://sourceforge.net/projects/swig/files/swig/
best,
Paw
Last edit: Paw 2017-07-24
i have compilation issues too. Everything else works fine.
What version of PyDSTool are you using?
I should have added that I am using SWIG 3 (now).
Ok. I tried to use swig 2.0. Did not work. I get the following set of error messages that I cannot (yet) decode...any help would be (much) appreciated.
clasajacobson@clasajacobson-Oryx-Pro:~/Downloads/pydstool-master/examples$ python3 Dopri_backwards_test.py
Present limitation of Python: Cannot rebuild library
without exiting Python and deleting the shared library
/home/clasajacobson/Downloads/pydstool-master/examples/_dop853_my_ode_vf.so
by hand! If you made any changes to the system you should
not proceed with running the integrator until you quit
and rebuild.
Did not compile shared library.
Error in importing compiled vector field and integrator.
Did you compile the RHS C code?
Traceback (most recent call last):
File "dop853_temp/dop853_my_ode_vf.py", line 14, in swig_import_helper
return importlib.import_module(mname)
File "/usr/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap="">", line 994, in _gcd_import
File "<frozen importlib._bootstrap="">", line 971, in _find_and_load
File "<frozen importlib._bootstrap="">", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named '_dop853_my_ode_vf'</frozen></frozen></frozen>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Dopri_backwards_test.py", line 23, in <module>
trajf = ode.compute('testf')
File "/usr/local/lib/python3.6/dist-packages/PyDSTool-0.90.2-py3.6.egg/PyDSTool/Generator/Dopri_ODEsystem.py", line 463, in compute
extraSpace=self.algparams['extraspace'],
File "/usr/local/lib/python3.6/dist-packages/PyDSTool-0.90.2-py3.6.egg/PyDSTool/Generator/Dopri_ODEsystem.py", line 45, in init
modname, *imp.find_module(modname, ["dop853_temp"]))
File "/usr/lib/python3.6/imp.py", line 235, in load_module
return load_source(name, filename, file)
File "/usr/lib/python3.6/imp.py", line 172, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap="">", line 684, in _load
File "<frozen importlib._bootstrap="">", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external="">", line 678, in exec_module
File "<frozen importlib._bootstrap="">", line 219, in _call_with_frames_removed
File "dop853_temp/dop853_my_ode_vf.py", line 17, in <module>
_dop853_my_ode_vf = swig_import_helper()
File "dop853_temp/dop853_my_ode_vf.py", line 16, in swig_import_helper
return importlib.import_module('_dop853_my_ode_vf')
File "/usr/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap="">", line 994, in _gcd_import
File "<frozen importlib._bootstrap="">", line 971, in _find_and_load
File "<frozen importlib._bootstrap="">", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named '_dop853_my_ode_vf'
clasajacobson@clasajacobson-Oryx-Pro:~/Downloads/pydstool-master/examples$ </frozen></frozen></frozen></module></frozen></frozen></frozen></frozen></module>
Five years later, I am using
PyDSToolagain. And I spend some time trying to figure out what I should do about this errorIt turns out we have to run the files from the folder they are in, ie.
I didn't read the error message properly and thought it might be a
swigerror. But from https://github.com/robclewley/pydstool/issues/140 we know that allswig >= 2are supported(evenswig 4).