2

I am trying to package (freeze) a python3 application using pyinstaller (ver. 3.3.1)

After running pyinstaller my_script.py it fails with a list of import errors, the first of which is the following:

292 INFO: checking Analysis
292 INFO: Building Analysis because out00-Analysis.toc is non existent
292 INFO: Initializing module dependency graph...
298 INFO: Initializing module graph hooks...
299 INFO: Analyzing base_library.zip ...
Failed to import the site module
Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site.py", line 544, in <module>
main()
...

...and continues with a longer list of import errors It could be it is a problem with my python3 configuration, or pyinstaller spec file. I am using at present the default pyinstaller spec file. Following is the system I am testing:

  • MacOSX 10.13.3 (High Sierra)
  • Python 3.6.4 (installed using brew)
  • pyinstaller 3.3.1 (installed using pip)

Thanks a lot for all your kind help.

Salvatore Cosentino
  • 6,663
  • 6
  • 17
  • 25

1 Answers1

5

Mac 10.13.3

Python 3.6.4

Pyinstaller 3.3.1

I had this problem and my resolution was to:

pip3 uninstall enum34

as per Why Python 3.6.1 throws AttributeError: module 'enum' has no attribute 'IntFlag'?

jhoe
  • 346
  • 1
  • 9