There's an issue with SWIG >= 3.0.9 in the way it imports the shared code (.dll or .so) for Python 2.7 if it's a package (i.e. installed under site-packages): https://github.com/swig/swig/issues/769
A workaround is not o rename dsmapi2.py to init.py when "installing" the package, but to additionally use a custom init.py to populate the packages namespace (otherwise, a "from dsmapi2.dsmapi2 import *" is required): http://www.swig.org/Doc3.0/Python.html#Python_importfrominit