Building Python in the usual way (in this case Python 3.5)
./configure --prefix=/usr/local/python3.5
make
sudo make altinstall
Installs a Python that is broken. e.g.
/usr/local/python3.5/bin/python3.5 -c "import random"
...
ImportError: No module named 'math'
It turns out that Suse then installs some modules into /usr/local/python3.5/lib64/ which Python does not include in it's sys.path
This is a bit of a hack but the easiest way to fix this (for me) is to
sudo ln -s /usr/local/python3.5/lib64/python3.5/lib-dynload /usr/local/python3.5/lib/
This issues is well known it seems - Python bug reports here and here