python - cx freeze does not work -


I'm new to Python, I've written a script in Linux machine using Python and wxpython. Now to convert .exe from .py to me, I used cxfreeze for that purpose exe

  $ python setup.py build / step to create python / setup $ python pip cxfreeze $ Cxfreeze script.py   

But when I execute "./script (exe)" in other systems I get this error:

  file "/ usr /local/lib/python2.7/dist-packages/cx_freeze/initscripts/Console .py ", line 27, & lt; Module & gt; File "script.py", line 3, & lt; Module & gt; The file "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/__init__.py", line 45, in & lt; Module & gt; The file "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", in line 4, in & lt; Module & gt; The file "ExtensionLoader_wx__core_.py", line 18, & lt; Module & gt; ImportError: No Name Module    

I used to use the following on seqoofreeze Try the simple wxPython app:

  import wx ############################### ##################################### Class MyFrame (wx.Frame): "" " "" "# ---------------------------------------------- - ----------------------- def __init __ (self): "" "constructor" "wx.frame .__ init __ (self, none , Title = "test exe", size = (1024, 768)) panel = wx.Panel (self) lbl = wx.StaticText (panel, label = "this is a binary program!") If __name_ _ == "__main__": app = wx app (false) frame = myframe () frame Show () app Main Loop ()   

When copying into a Windows 7 box, the output will not work at all. It's not making files for CentOS, not Windows! No wonder because I'm running a script on the Linux box. If you run cxfreeze on Windows, you will end up with some DLL files in your output. Either way, when you run the exe generated on Windows, then it works. When you run the file, it builds on CentOS, it works but if you try to copy files generated from that OS to a different OS, then it does not work.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -