Search code examples
pythontkinterpyinstallerpyexcel

Unable to use pyexcel-xls with pyinstaller python version 3.6


when I create an exe file and try to run it here is an exception that I am getting:

 Exception in Tkinter callback
Traceback (most recent call last):
File "tkinter\__init__.py", line 1702, in __call__
File "static_data_final01.py", line 86, in lets_go
File "static_data_final01.py", line 99, in EMT
File "site-packages\pyexcel\core.py", line 111, in save_book_as
 File "site-packages\pyexcel\internal\core.py", line 33, in get_book_stream
File "site-packages\pyexcel\plugins\sources\file_input.py", line 39, in 
get_data
File "site-packages\pyexcel\plugins\parsers\excel.py", line 18, in 
parse_file
File "site-packages\pyexcel\plugins\parsers\excel.py", line 39, in 
_parse_any
 File "site-packages\pyexcel_io\io.py", line 71, in get_data
 File "site-packages\pyexcel_io\io.py", line 89, in _get_data
 File "site-packages\pyexcel_io\io.py", line 185, in load_data
 File "site-packages\pyexcel_io\plugins.py", line 90, in get_a_plugin
 File "site-packages\lml\plugin.py", line 293, in load_me_now
 File "site-packages\pyexcel_io\plugins.py", line 107, in raise_exception
pyexcel_io.exceptions.SupportingPluginAvailableButNotInstalled: **Please 
install pyexcel-xls**

Please don't say this ticket is a duplicate from :Unable to use pyexcel-xls with pyinstaller . python executable not working . python version 3.4.4 because I have tried to copy the the changed file into my pyexcel_io/__init__.py and it's still not working

I am using Visual Studio 2017 Python 3.6 and also when I try pip install pyexcel or pip install pyexcel-io I get this:

 ----- Installing 'pip install pyexcel' -----
Collecting pip
Using cached 

https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl

Collecting install
Could not find a version that satisfies the requirement install (from 
versions: )
No matching distribution found for install
----- Failed to install 'pip install pyexcel' -----

Here is a command I run from Cmd: pyinstaller.exe --onefile static_data_final01.py --hidden-import pyexcel_io.readers.csvr --hidden-import pyexcel_io.readers.csvz --hidden-import pyexcel_io.readers.tsv --hidden-import pyexcel_io.readers.tsvz --hidden-import pyexcel_io.writers.csvw --hidden-import pyexcel_io.readers.csvz --hidden-import pyexcel_io.readers.tsv --hidden-import pyexcel_io.readers.tsvz --hidden-import pyexcel_io.database.importers.django --hidden-import pyexcel_io.database.importers.sqlalchemy --hidden-import pyexcel_io.database.exporters.django --hidden-import pyexcel_io.database.exporters.sqlalchemy --hidden-import pyexcel_xls --hidden-import pyexcel_xls.xlsr --hidden-import pyexcel_xls.xlsw -–hidden-import pyexcel.plugins -–hidden-import pyexcel.plugins.parsers -–hidden-import pyexcel.plugins.renderers -–hidden-import pyexcel.plugins.sources -–hidden-import pyexcel.plugins.sources.file_input -–hidden-import pyexcel.plugins.parsers.excel --hidden-import pyexcel_xls --hidden-import pyexcel_xls.xls --hidden-import pyexcel_xlsx --hidden-import pyexcel_xlsx.xlsx --hidden-import pyexcel_xls --hidden-import pyexcel_xls.xls

Also when I run my script from Visual Studio my app works perfectly!


Solution

  • Since I haven't found a proper solution using pyexcel I have found other module that works flawlessly with PyInstaller .

    Module name is xlrd.

    Here is a link