For general advice on how to run python scripts on ebooks, see
Visual Kindle Guide. The KindlePID page covers installing python, and KindleFIX is a script which modifies MOBI ebook files to allow (some of) them to run on a Kindle. It does not remove DRM, so we can talk freely about KindleFIX here, but mobidedrm is similar except that it has different arguments.