Re: [PyInstaller] Matplotlib pyplot for Mac OS X

161 views
Skip to first unread message

Glenn Ramsey

unread,
Jun 17, 2012, 10:52:50 PM6/17/12
to pyins...@googlegroups.com
On 17/06/12 19:38, Nathan Salomonis wrote:
> Hi all,
>
> First off, I'd like to say how impressed I am with PyInstaller. It has proven to
> resolve issues that I have encountered with other freeze program (CxFreeze in
> Linux). I just built a distribution for one of my applications on Mac OS X 10.6
> and it worked great, producing a onefile application that was 1/6th the size of
> the equivalent py2app version. Since I want to distribute my application to OS X
> 10.5 users, I am now trying the option "python arch -i386". This builds the one
> file distribution that runs but encounters an issue when trying to import pyplot
> from matplotlib. The error is:
>
> ImportError:
> dlopen(/var/folders/VR/VRc6OFUIGsS6cupB0zstt++++TI/-Tmp-//_MEIhz4ePp/matplotlib.ft2font.so,
> 2): Symbol not found: _FT_Attach_File
> Referenced from:
> /var/folders/VR/VRc6OFUIGsS6cupB0zstt++++TI/-Tmp-//_MEIhz4ePp/matplotlib.ft2font.so
> Expected in: flat namespace
> in
> /var/folders/VR/VRc6OFUIGsS6cupB0zstt++++TI/-Tmp-//_MEIhz4ePp/matplotlib.ft2font.so
>
> I'm assuming this is because Matplotlib was installed from source on my 64bit
> machine and that the ft2font.so is not compatible with a 32bit installation. Any
> recommendations around this before trying to re-install MatPlotlib as 32bit?

Hi Nathan,

Not sure if this is relevant, but I'll mention it in case it helps. When I
needed to make a 32 bit version of a PyQt app the only way I could get all the
components to play nicely together was to build everything as 32 bit. I used the
Python from Macports and configured Macports to build as 32 bit.

Also there was a bug in PyInstaller 1.5, where the OSX loader was 64bit when it
was supposed to be 32bit. I'm not sure if that has been fixed in the stable
release. If it hasn't then in order to fix it you have to compile the loader
yourself.

Glenn

Martin Zibricky

unread,
Jun 18, 2012, 6:56:56 AM6/18/12
to pyins...@googlegroups.com
Hi Nathan,

you have not mentioned what pyinstaller version you use. I recommend
trying development version.

Glenn Ramsey píše v Po 18. 06. 2012 v 14:52 +1200:
> Hi Nathan,
>
> Not sure if this is relevant, but I'll mention it in case it helps.
> When I
> needed to make a 32 bit version of a PyQt app the only way I could get
> all the
> components to play nicely together was to build everything as 32 bit.
> I used the
> Python from Macports and configured Macports to build as 32 bit.
>
> Also there was a bug in PyInstaller 1.5, where the OSX loader was
> 64bit when it
> was supposed to be 32bit. I'm not sure if that has been fixed in the
> stable
> release.

There is not yet any stable release with this fix.

Nathan Salomonis

unread,
Jun 22, 2012, 2:37:56 AM6/22/12
to pyins...@googlegroups.com
Sorry for the delay in response. This is using the development version 2145d84
 downloaded last week. I tried the version compiled using "python arch -i386" option on a 10.5 machine but no luck with it recognizing the bundled version of python (at least starts up the GUI on my 64bit 10.6 machine).

I've seen some of the PyQt suggestions on other pages as well and will give it a shot.
Thanks,
Nathan



On Sunday, June 17, 2012 12:38:42 AM UTC-7, Nathan Salomonis wrote:
Hi all,

First off, I'd like to say how impressed I am with PyInstaller. It has proven to resolve issues that I have encountered with other freeze program (CxFreeze in Linux). I just built a distribution for one of my applications on Mac OS X 10.6 and it worked great, producing a onefile application that was 1/6th the size of the equivalent py2app version. Since I want to distribute my application to OS X 10.5 users, I am now trying the option "python arch -i386". This builds the one file distribution that runs but encounters an issue when trying to import pyplot from matplotlib. The error is:

ImportError: dlopen(/var/folders/VR/VRc6OFUIGsS6cupB0zstt++++TI/-Tmp-//_MEIhz4ePp/matplotlib.ft2font.so, 2): Symbol not found: _FT_Attach_File
  Referenced from: /var/folders/VR/VRc6OFUIGsS6cupB0zstt++++TI/-Tmp-//_MEIhz4ePp/matplotlib.ft2font.so
  Expected in: flat namespace
 in /var/folders/VR/VRc6OFUIGsS6cupB0zstt++++TI/-Tmp-//_MEIhz4ePp/matplotlib.ft2font.so

I'm assuming this is because Matplotlib was installed from source on my 64bit machine and that the ft2font.so is not compatible with a 32bit installation. Any recommendations around this before trying to re-install MatPlotlib as 32bit?

Thanks,
Nathan


Nathan Salomonis

unread,
Jun 22, 2012, 2:39:54 AM6/22/12
to pyins...@googlegroups.com
I should add that the version I was able to build using "python arch -i386" was without importing MatPlotlib.
Best,
Reply all
Reply to author
Forward
0 new messages