2017-10-24 4 views
-2

py2celを使用してコンパイルされた.xlsファイルを読み書きするためにpyexcelを使用するプロジェクトで作業しています。IOError:xlsに適切なライブラリが見つかりません

コンパイルしてpyexcel、pyexcel-io、pyexcel-xlsがlibrary.zipフォルダにあることを確認した後、このエラーが発生します。

Traceback (most recent call last): 

File "FundDatabase.pyo", line 391, in get_worksheet 

File "pyexcel\core.pyo", line 118, in get_book 

File "pyexcel\core.pyo", line 137, in _get_book 

File "pyexcel\sources\file_source_input.pyo", line 52, in get_data 

File "pyexcel_io\io.pyo", line 31, in get_data 

File "pyexcel_io\io.pyo", line 118, in load_data_new 

File "pyexcel_io\manager.pyo", line 94, in create_reader 

File "pyexcel_io\manager.pyo", line 89, in _get_a_handler 

IOError: No suitable library found for xls 

here is my project library

答えて

0

短い答え

あなたはpyexcel-XLSについての隠された輸入についてpyInstallerのを教えてやる必要があります。

pyexcel-XLSをパッケージ化するためには、あなたが指定する必要があります。

--hidden-import pyexcel_xls 
--hidden-import pyexcel_xls.xlsr 
--hidden-import pyexcel_xls.xlsw 

参考:mechanism of dynamic load module, confilict with pyinstaller/cx_freeze's execution

ロング回答

バージョン0.5.0以来、pyexcelはlazy loadingを使用して、どのすべてのモジュールがプログラムの起動時に読み込まれるわけではないので、pystallerに問題が発生します。したがって、pyinstallerに不足しているインポート(非表示のインポート)について通知する必要があります。

pyInstallerのは

http://pyexcel.readthedocs.io/en/latest/pyinstaller.html

http://pyexcel-io.readthedocs.io/en/latest/pyinstaller.html

ノート
関連する問題