Python Forum

Full Version: Python 3.6 geetin error : pyimod03_importers.py
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi experts,
After converting python program to exe, i am getting pyimod03_importers.py error
Although I have imported pandas,xlrd,numpy and pyinstaller. Not sure what is issue

Please help

Below is error message:
Error:
E:\UDReport>stage9_SGUmanagedChange_UDReports.exe >Test.txt Traceback (most recent call last): File "site-packages\pandas\__init__.py", line 26, in <module> File "c:\users\kumarajn\appdata\local\programs\python\python36-32\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exe c_module File "site-packages\pandas\_libs\__init__.py", line 4, in <module> File "c:\users\kumarajn\appdata\local\programs\python\python36-32\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in loa d_module File "pandas\_libs\tslib.pyx", line 1, in init pandas._libs.tslib ModuleNotFoundError: No module named 'pandas._libs.tslibs.timedeltas' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "stage9_SGUmanagedChange_UDReports.py", line 21, in <module> import pandas as pd File "c:\users\kumarajn\appdata\local\programs\python\python36-32\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exe c_module File "site-packages\pandas\__init__.py", line 35, in <module> ImportError: C extension: No module named 'pandas._libs.tslibs.timedeltas' not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace --force' to build the C extensions first. [13724] Failed to execute script stage9_SGUmanagedChange_UDReports
Look at this Thread
Error:
ModuleNotFoundError: No module named 'pandas._libs.tslibs.timedeltas
Open spec file(auto generated every time run pyinstaller) and add:
hiddenimports=['pandas._libs.tslibs.timedeltas'],
The you run spec file:
pyinstaller --clean your.spec
(Jan-04-2018, 11:50 AM)snippsat Wrote: [ -> ]Look at this Thread
Error:
ModuleNotFoundError: No module named 'pandas._libs.tslibs.timedeltas
Open spec file(auto generated every time run pyinstaller) and add:
hiddenimports=['pandas._libs.tslibs.timedeltas'],
The you run spec file:
pyinstaller --clean your.spec


this method does not work for me anymore. :( Cry
and i found this https://github.com/pyinstaller/pyinstaller/issues/2999 .. keep trying.
(Jan-04-2018, 06:31 AM)Rajnishbsm Wrote: [ -> ]pandas._libs.tslibs.timedeltas

Update .py with import pandas._libs.tslibs.timedeltas