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

前端 未结 2 1380
囚心锁ツ
囚心锁ツ 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:49

    I experienced the same issue using py2exe in place of pyinstaller. After doing some research on my code and some googling I ended up in this thread and found out that the problem is similar and so is the solution. If this can be of any help for others, in order to generate executables with py2exe with the use of pyexcel libraries I added 'pyexcel_xls.xls' and 'pyexcel_xlsx.xlsx' in the includes section in the py2exe setup options. So:

    setup(
        name='Hello'
        version='0.1'
        description='Hello program'
        author='Me'
        options={
                'compressed': 1
                'optimized': 1
                'includes': ['pyexcel_xls.xls', 'pyexcel_xlsx.xlsx' ...]
            }
        console=['hello.py']
    )
    

提交回复
热议问题