Sunday 15 April 2012

python - PyInstaller and Pandas -


I have a fairly simple Python module that I am trying to compile in a Windows exe file. In my script I am using wxPython and Pandas libraries. The PyInstaller exe file that only opens / opens when the Panda library is excluded from my module works

I am getting the same issue when I use --onefile or -. Onedir in PyInstaller I found online that the 'new' version of PyInstaller (2.1) should have taken care of this bug. Does anyone have any ideas on what to do?

PyInstaller: Version 2.1 Panda: Version 0.15.2 Python: Version 2.7

Thanks

I ran into the same problem I have boiled it down in a simple script, like Holopage:

  import panda print "hello world, pandas successfully Was imported! "  

To import Pendes at the right time, I have to modify Hello.spec in the following:

  # - * - Mode: Python - * - block_cipher = none def get_pandas_path (): import pandas pandas_path = pandas.__ path___ [0] return pandas_path a = analysis (['Hello.py'], pethax = ['c: \\ scriptsatatarepandus'], binaries = any No, Datas = none, hiddenimports = [], hookspath = none, runtime_hooks = none, none outside = none, win_no_prefer_redirects = none, win_private_assemblies = none, cipher = block_per) dict_tree = tree (get_pandas_path (), Prefix = 'pandes', excluded = ["* .pyc"] a.datas + = dict_tree a.binaries = filter (lambda x: 'panda' not in x [0], a.binaries) pyz = PYZ (a.pure, a.zipped_data, cipher = block_cipher) exe = exe (pyz, a.scripts, exclude_binaries = true, name = 'hello', debug = false, strip = none, upx = true, console = true ) Scoll = COLL ECT (exe, a.binaries, a.zipfiles, a.datas, strip = none, upx = true, name = 'hello')  

Then I ran: / P>

$ pyinstaller Hello.spec --onefile

from the command prompt and I hope the message 'Hello World' was found. I still can not fully understand why it is necessary that I have a custom build of Pond - which is installed in MKL libraries - but I am not clear whether the run is causing failure.

This is similar to the answer:


No comments:

Post a Comment