0

This is my run.py file, it works perfectly fine if you run it manually with something like py -3 run.py

import shotgun_api3

I use Python 3 to build the .exe using PyInstaller:

py -3 -m PyInstaller run.py

The build completes successfully. When I try to run the .exe I get this error:

ModuleNotFoundError: No module named 'xmlrpc'

So I tried adding import xmlrpc above the import shotgun_api3 in my run.py, then the error changed to this:

ModuleNotFoundError: No module named 'xmlrpc.client'
Frank
  • 2,109
  • 7
  • 25
  • 48

2 Answers2

0

Definitely not the best solution, but I managed to build the executable. I had to remove httplib2 and six from shotgun api, pip-installed them by myself and updated imports in shotgun.py.

0

I had to add them as hidden imports as well as a few others:

pyinstaller --hidden-import urllib2 --hidden-import xmlrpc --hidden-import xmlrpc.client --hidden-import xmlrpclib --hidden-import cookielib main.py