I am interested in numerical methods for solving odes using Python. I would like to refere to:

Linge, S., & Langtangen, H. P. (2020). Programming for Computations-Python: A Gentle Introduction to Numerical Simulations with Python 3.6 (p. 332). Springer Nature.

In this book Odespy package has been considered as a milestone for numerical integration of odes (and systems of).

I know that using Odespy with my Ubuntu is not possible because of my Ubuntu version.

Unfortunately I have the last version of Ubuntu i.e. 20.10 which doesn't support odespy (e.g. see here). This kind of package is written for Python 2.7 and I have Python 3.

Is there a valid alternative to this package?


This software may be installed on 20.10, but you need to manually get NumPy for Python 2 from 20.04 LTS repository; SciPy from 18.04 LTS. Use commands below:

sudo apt-get install python-dev gfortran-9 git

# set gfortran-9 as default (as in 20.04 LTS)
sudo apt-get remove gfortran # remove gfortran-10
sudo ln -s /usr/bin/gfortran-9 /usr/local/bin/gfortran

cd ~/Downloads
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/p/python-numpy/python-numpy_1.16.5-2ubuntu7_amd64.deb
sudo apt-get install ./python-numpy_1.16.5-2ubuntu7_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/p/python-scipy/python-scipy_0.19.1-2ubuntu1_amd64.deb
sudo apt-get install ./python-scipy_0.19.1-2ubuntu1_amd64.deb

git clone https://github.com/hplgit/odespy
cd odespy
sudo python2 setup.py install

And then use odespy.