Kein Modul mit dem Namen 'pandas._libs.tslibs.timedeltas' in PyInstaller

Ich versuche, wickeln Sie ein Python-Skript in eine exe-Datei mit PyInstaller (Entwicklungs-version) für windows.

Verwendet das Skript Pandas und ich wurden in eine Fehlermeldung beim ausführen der exe-Datei.

Traceback (most recent call last):   File "site-packages\pandas\__init__.py", line 26, in <module>   File "C:\Users\Eddie\Anaconda3\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
    exec(bytecode, module.__dict__)   File "site-packages\pandas\_libs\__init__.py", line 4, in <module>   File "C:\Users\Eddie\Anaconda3\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in load_module
    module = loader.load_module(fullname)   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 "G5k Version file Extract (with tkinter).py", line 15, in <module>   File "C:\Users\Eddie\Anaconda3\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
    exec(bytecode, module.__dict__)   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.

Habe ich versucht dies zu tun für Programme ohne pandas und alles war in Ordnung.

Dies ist sehr ähnlich zu eine andere Frage bereits gelöst für Python 2, aber ich bin mit Python 3 und die Lösung nicht auf die gleiche Weise angewendet, aufgrund der veränderten .spec-Datei-format.

Python 3.6
PyInstaller - version 3.3
Pandas - version 0.20.3

InformationsquelleAutor Eduard Fidler | 2017-11-15

Schreibe einen Kommentar