Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
442 views
in Technique[技术] by (71.8m points)

Python-Magic: Can not run Python exe compiled by py2exe when contains reference to python-Magic

Need help.

I have a python program which uses python-magic. When I run interactively, it runs as expected. When I compile the program with pyinstaller - it executes fine.

but I need to compile the program with py2exe. but when I compile the program with py2exe and run the program

Traceback (most recent call last):
  File "filemonitor13.py", line 24, in <module>
  File "<frozen zipimport>", line 259, in load_module
  File "magic\__init__.pyc", line 1, in <module>
  File "<frozen zipimport>", line 259, in load_module
  File "magicmagic.pyc", line 189, in <module>
ImportError: failed to find libmagic.  Check your installation

I am using python 9.1. I need help as all our program are compiled with py2exe, I need to execute exe compiled by py2exe


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...