common problem, and using matplotlib gives lot of problems in pyinstaller, actually not only matplotlib but also you would need to copy numpy/ numaray whatver you are using in your program because matplotlib will need that. explicit imports to your matplotlib and numpy in your spec file will ensure it being picked up add it to your spec file and make sure your pythonpath can find them
import matplotlib import matplotlib.xxx (whatever all other packages u use) import pylab (if u use pylab interface) import numpy import numpy.xxx (whatever all other package u use..) the way i do it is to pack matplotlib in a single pkg file and numpy in a single pkg file and include them in executable, in my init script i just unpack them and use. On May 27, 5:07 pm, Massi <[EMAIL PROTECTED]> wrote: > Yes, I did the same and the problem was solved, but I couldn't build > the executable anyway. well, in fact the executable is built, but it > can't be run....It seems that pyinstaller can't import matplotlib > packages. Did anyone have the same problem? > > On 27 Mag, 12:14, Tobbe <[EMAIL PROTECTED]> wrote: > > > I had that problem as well. All I had to do to fix it was to grab the > > latest version of PyInstaller from svn > > > On May 24, 2:06 pm, Massi <[EMAIL PROTECTED]> wrote: > > > > Hi everyone, I'm trying to build this simple program with pyinstaller > > > 1.3 (wxpython 2.8, python2.5, matplotlib 0.90.0): > > > > #graph.py > > > > import wx,wxmpl,numpy > > > > def plotfunc(e, axes): > > > f = (numpy.arange(-100,101)/100.)**e > > > axes.plot(f) > > > > class MyMenu(wx.Frame): > > > def __init__(self, parent, id, title): > > > wx.Frame.__init__(self, parent, id, title, wx.DefaultPosition, > > > wx.Size(600, 400)) > > > panel = wxmpl.PlotPanel(self, -1) > > > figure = panel.get_figure() > > > axes = figure.gca() > > > plotfunc(1, axes) > > > self.Centre() > > > self.Bind(wx.EVT_MENU, self.OnQuit, id=105) > > > > def OnQuit(self, event): > > > self.Close() > > > > class MyApp(wx.App): > > > def OnInit(self): > > > frame = MyMenu(None, -1, 'graph') > > > frame.Show(True) > > > return True > > > > app = MyApp(0) > > > app.MainLoop() > > > > This is the output of pyinstaller : > > > > checking Analysis > > > building Analysis because out0.toc non existent > > > running Analysis out0.toc > > > Analyzing: support\_mountzlib.py > > > Analyzing: support\useUnicode.py > > > Analyzing: graph.py > > > W: Cannot determine your Windows or System directories > > > W: Please add them to your PATH if .dlls are not found > > > W: or install starship.python.net/skippy/win32/Downloads.html > > > E: lib not found: wxmsw26uh_vc.dll dependency of C:\Python25\lib\site- > > > packages\matplotlib\backends\_wxagg.pyd > > > Warnings written to C:\pyinstaller-1.3\warngraph.txt > > > checking PYZ > > > rebuilding out1.toc because out1.pyz is missing > > > building PYZ out1.toc > > > checking PKG > > > rebuilding out3.toc because out3.pkg is missing > > > building PKG out3.pkg > > > checking ELFEXE > > > rebuilding out2.toc because graph.exe missing > > > building ELFEXE out2.toc > > > > Pyinstaller succeeds in building the program, but when I try to run > > > graph.exe a message dialog appears telling me that "msvcr71.dll could > > > not be extracted". I googled and found that's a common problem, but I > > > didn't find how to fix it. Can anyone help me? > > > > Thanks in advance, > > > Massi --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "PyInstaller" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/PyInstaller?hl=en -~----------~----~----~----~------~----~------~--~---
