Search code examples
pythonpandascx-freezepython-3.4

Error when freezing pandas 0.15.1 with cx_freeze 4.3.1


I am trying to freeze a Python script with cx_Freeze. The script makes use of pandas. When I run the executable created by cx_Freeze, I get the following Traceback:

  [...]
  File "C:\Python34\lib\site-packages\pandas\__init__.py", line 7, in <module>
  from . import hashtable, tslib, lib
  File "X:\Python34-x32\lib\importlib\_bootstrap.py", line 2284, in _handle_fromlist
  File "X:\Python34-x32\lib\importlib\_bootstrap.py", line 321, in _call_with_frames_removed
  File "X:\Python34-x32\lib\importlib\_bootstrap.py", line 2237, in _find_and_load
  File "X:\Python34-x32\lib\importlib\_bootstrap.py", line 2226, in _find_and_load_unlocked
  File "X:\Python34-x32\lib\importlib\_bootstrap.py", line 1191, in _load_unlocked
  File "X:\Python34-x32\lib\importlib\_bootstrap.py", line 1161, in _load_backward_compatible
  File "ExtensionLoader_pandas_tslib.py", line 22, in <module>
  File "ExtensionLoader_pandas_tslib.py", line 14, in __bootstrap__
  File "pandas\tslib.pyx", line 2842, in init pandas.tslib (pandas\tslib.c:80063)
  File "X:\Python34-x32\lib\importlib\_bootstrap.py", line 2237, in _find_and_load
  File "X:\Python34-x32\lib\importlib\_bootstrap.py", line 2226, in _find_and_load_unlocked
  File "X:\Python34-x32\lib\importlib\_bootstrap.py", line 1191, in _load_unlocked
  File "X:\Python34-x32\lib\importlib\_bootstrap.py", line 1161, in _load_backward_compatible
  File "ExtensionLoader_pandas_algos.py", line 22, in <module>
  File "ExtensionLoader_pandas_algos.py", line 14, in __bootstrap__
  File "pandas\algos.pyx", line 64, in init pandas.algos (pandas\algos.c:181716)
  File "X:\Python34-x32\lib\importlib\_bootstrap.py", line 2284, in _handle_fromlist
  File "X:\Python34-x32\lib\importlib\_bootstrap.py", line 321, in _call_with_frames_removed
  File "X:\Python34-x32\lib\importlib\_bootstrap.py", line 2237, in _find_and_load
  File "X:\Python34-x32\lib\importlib\_bootstrap.py", line 2226, in _find_and_load_unlocked
  File "X:\Python34-x32\lib\importlib\_bootstrap.py", line 1191, in _load_unlocked
  File "X:\Python34-x32\lib\importlib\_bootstrap.py", line 1161, in _load_backward_compatible
  File "ExtensionLoader_pandas_lib.py", line 22, in <module>
  File "ExtensionLoader_pandas_lib.py", line 14, in __bootstrap__
  File "pandas\lib.pyx", line 1, in init pandas.lib (pandas\lib.c:77946)
  AttributeError: 'module' object has no attribute '__pyx_capi__'

I'm using Python 3.4 - 32 bits. Does anybody have an idea?


Solution

  • This was a bug, fixed here in master and will be available in 0.15.2 (soon). You can get windows builds here