Unable to use pyexcel-xls with pyinstaller . python executable not working . python version 3.4.4

前端 未结 2 1372
囚心锁ツ
囚心锁ツ 2020-12-19 22:35

The program works when run using:

Python filename.py

but when I create its executable file using \"pyinstaller\"

pyinstall         


        
2条回答
  •  暖寄归人
    2020-12-19 22:56

    The Problem

    pyexcel-io uses a method for including plug-ins that pyinstaller does not support. See this issue.

    The Workaround

    The work around for this issue has a couple of facets.

    Change needed to pyexcel

    I have submitted a Change Request which shows how to modify pyexcel to allow it to work with pyinstaller. Basically pyexcel-io needs to know how to find frozen modules.

    If the pyexcel guys pick up the Change Request, then that will get you going. But if they don't, or you are in a hurry, then copying the changed file from the change request into your site package directory as pyexcel_io/__init__.py will get pyexcel working.

    But, pyinstaller also needs to know what to include.

    pyinstaller also needs to know to include the required module. So on the pyinstaller command line you will also need to do:

    --hidden-import pyexcel_xls.xls
    

    Update:

    Change request with this fix has been merged into master branch of pyexcel.

    Update #2:

    Fix has been released to pypi.

提交回复
热议问题