simple matplotlib example on mac with pyinstaller

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Til
Reply | Threaded
Open this post in threaded view
|

simple matplotlib example on mac with pyinstaller

Til
Hi!

I'm trying to create a mac-compatible application which shows some matplotlib figure. I'm using the enthought python installation and the following minimal python script:

#!/usr/bin/env python
import matplotlib
matplotlib.use("MacOSX")
from matplotlib.pyplot import *
from numpy import *
x=linspace(0,2*pi,200)
plot(x,sin(x))
show()

Then I compile with `python pyinstaller.py --windowed test.py`. It compiles find, even shows the figure when I start it, but as soon as I move the mouse on the figure, it crashes with the error message:

MKL FATAL ERROR: Cannot load libmkl_core.dylib

Any ideas how to fix it?

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: simple matplotlib example on mac with pyinstaller

Martin Zibricky
Til píše v Čt 07. 03. 2013 v 11:34 -0800:
> Then I compile with `python pyinstaller.py --windowed test.py`. It
> compiles find, even shows the figure when I start it, but as soon as I
> move the mouse on the figure, it crashes with the error message:
>
>         MKL FATAL ERROR: Cannot load libmkl_core.dylib
>
>
> Any ideas how to fix it?

Is this library included with other files collected by pyinstaller?

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: simple matplotlib example on mac with pyinstaller

Ron Shaar
Hi!
I have exactly the same problem. I can make an app from my matplotlib (and wxpython gui) programs. but as soon the mouse goes over the figures, the program crashes and I get the message "MKL FATAL ERROR: Cannot load libmkl_core.dylib". 
Can someone please help me understanding what is causing the problem, and how can I fix it?
Thank you very much,
Ron.


On Friday, March 8, 2013 2:55:31 PM UTC-8, Martin Z wrote:
Til píše v Čt 07. 03. 2013 v 11:34 -0800:
> Then I compile with `python pyinstaller.py --windowed test.py`. It
> compiles find, even shows the figure when I start it, but as soon as I
> move the mouse on the figure, it crashes with the error message:
>
>         MKL FATAL ERROR: Cannot load libmkl_core.dylib
>
>
> Any ideas how to fix it?

Is this library included with other files collected by pyinstaller?

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: simple matplotlib example on mac with pyinstaller

Martin Zibricky
Ron Shaar píše v Út 12. 03. 2013 v 08:33 -0700:
> Hi! I have exactly the same problem. I can make an app from my
> matplotlib (and wxpython gui) programs. but as soon the mouse goes
> over the figures, the program crashes and I get the message "MKL FATAL
> ERROR: Cannot load libmkl_core.dylib".  Can someone please help me
> understanding what is causing the problem, and how can I fix it? Thank
> you very much, Ron.

This seems like an issue related to the matplotlib and the way it is
packaged. Matplotlib probably uses ctypes module to lod libmkl
dynamically and pyinstaller is thus not able to find it.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: simple matplotlib example on mac with pyinstaller

Ron Shaar
Thank you Martin,
Could you please explain me what should I do to make it work?
Thank again!

On Tuesday, March 12, 2013 12:00:49 PM UTC-7, Martin Z wrote:
Ron Shaar píše v Út 12. 03. 2013 v 08:33 -0700:
> Hi! I have exactly the same problem. I can make an app from my
> matplotlib (and wxpython gui) programs. but as soon the mouse goes
> over the figures, the program crashes and I get the message "MKL FATAL
> ERROR: Cannot load libmkl_core.dylib".  Can someone please help me
> understanding what is causing the problem, and how can I fix it? Thank
> you very much, Ron.

This seems like an issue related to the matplotlib and the way it is
packaged. Matplotlib probably uses ctypes module to lod libmkl
dynamically and pyinstaller is thus not able to find it.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: simple matplotlib example on mac with pyinstaller

Martin Zibricky
Ron Shaar píše v Út 12. 03. 2013 v 13:25 -0700:
> Thank you Martin, Could you please explain me what should I do to make
> it work? Thank again!

Try to look at matplotlib code if it uses module 'ctypes' somewhere.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: simple matplotlib example on mac with pyinstaller

dhyams
In reply to this post by Ron Shaar

If I were guessing, I'd say matplotlib depends on numpy, and your numpy installation was compiled against the math kernel library.  (Mkl). Try writing a tiny numpy script and package it to see if you get the same error.

Even if that is the case, I'm not sure why it would not be packaged.  After you see the error try copying that lib to your package Dir to see if it will run.

Daniel Hyams

On Mar 12, 2013 11:55 AM, "Ron Shaar" <[hidden email]> wrote:
Hi!
I have exactly the same problem. I can make an app from my matplotlib (and wxpython gui) programs. but as soon the mouse goes over the figures, the program crashes and I get the message "MKL FATAL ERROR: Cannot load libmkl_core.dylib". 
Can someone please help me understanding what is causing the problem, and how can I fix it?
Thank you very much,
Ron.


On Friday, March 8, 2013 2:55:31 PM UTC-8, Martin Z wrote:
Til píše v Čt 07. 03. 2013 v 11:34 -0800:
> Then I compile with `python pyinstaller.py --windowed test.py`. It
> compiles find, even shows the figure when I start it, but as soon as I
> move the mouse on the figure, it crashes with the error message:
>
>         MKL FATAL ERROR: Cannot load libmkl_core.dylib
>
>
> Any ideas how to fix it?

Is this library included with other files collected by pyinstaller?

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: simple matplotlib example on mac with pyinstaller

Ron Shaar
I re-installed python from EPD (epd-7.3-2-macosx-i386), and tried a very simple script:

import matplotlib.pyplot

x=[1,2,3,4]
y=[1,2,3,4]
matplotlib.pyplot.figure(1)
matplotlib.pyplot.plot(x,y)
matplotlib.pyplot.show()

The program fails only when the mouse go over the figure.

Any suggestions what I should do next?
Thanks.
Ron.


On Tuesday, March 12, 2013 2:46:43 PM UTC-7, dhyams wrote:

If I were guessing, I'd say matplotlib depends on numpy, and your numpy installation was compiled against the math kernel library.  (Mkl). Try writing a tiny numpy script and package it to see if you get the same error.

Even if that is the case, I'm not sure why it would not be packaged.  After you see the error try copying that lib to your package Dir to see if it will run.

Daniel Hyams

On Mar 12, 2013 11:55 AM, "Ron Shaar" <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="q6Dk-MZEee8J">rons...@...> wrote:
Hi!
I have exactly the same problem. I can make an app from my matplotlib (and wxpython gui) programs. but as soon the mouse goes over the figures, the program crashes and I get the message "MKL FATAL ERROR: Cannot load libmkl_core.dylib". 
Can someone please help me understanding what is causing the problem, and how can I fix it?
Thank you very much,
Ron.


On Friday, March 8, 2013 2:55:31 PM UTC-8, Martin Z wrote:
Til píše v Čt 07. 03. 2013 v 11:34 -0800:
> Then I compile with `python pyinstaller.py --windowed test.py`. It
> compiles find, even shows the figure when I start it, but as soon as I
> move the mouse on the figure, it crashes with the error message:
>
>         MKL FATAL ERROR: Cannot load libmkl_core.dylib
>
>
> Any ideas how to fix it?

Is this library included with other files collected by pyinstaller?

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="q6Dk-MZEee8J">pyinstaller...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="q6Dk-MZEee8J">pyins...@....
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: simple matplotlib example on mac with pyinstaller

jelle feringa
In reply to this post by dhyams

If I were guessing, I'd say matplotlib depends on numpy, and your numpy installation was compiled against the math kernel library.  (Mkl). 

Stop guessing. That's how it is ;) 

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: simple matplotlib example on mac with pyinstaller

Ron Shaar
sorry for being dumb, but could you please explain what should I do in this case?
Thanks you very much,
Ron.

On Wednesday, March 13, 2013 2:36:29 AM UTC-7, jelle feringa wrote:

If I were guessing, I'd say matplotlib depends on numpy, and your numpy installation was compiled against the math kernel library.  (Mkl). 

Stop guessing. That's how it is ;) 

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: simple matplotlib example on mac with pyinstaller

dhyams
Ron:

Personally, I'm not sure.  The first step, to make sure that it works, is to find the mkl library on your system (probably something like libmkl.dylib or libmkl.so) and manually copy it to the directory that you packaged in (I'm assuming one-dir packaging here; if you didn't package one-dir, do so).  Then run, so see if you get the same error.


On Wed, Mar 13, 2013 at 4:06 PM, Ron Shaar <[hidden email]> wrote:
sorry for being dumb, but could you please explain what should I do in this case?
Thanks you very much,
Ron.


On Wednesday, March 13, 2013 2:36:29 AM UTC-7, jelle feringa wrote:

If I were guessing, I'd say matplotlib depends on numpy, and your numpy installation was compiled against the math kernel library.  (Mkl). 

Stop guessing. That's how it is ;) 

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Daniel Hyams
[hidden email]

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: simple matplotlib example on mac with pyinstaller

dhyams
Not that it helps much, but http://www.enthought.com/epd/mkl/

On Wed, Mar 13, 2013 at 4:12 PM, Daniel Hyams <[hidden email]> wrote:
Ron:

Personally, I'm not sure.  The first step, to make sure that it works, is to find the mkl library on your system (probably something like libmkl.dylib or libmkl.so) and manually copy it to the directory that you packaged in (I'm assuming one-dir packaging here; if you didn't package one-dir, do so).  Then run, so see if you get the same error.


On Wed, Mar 13, 2013 at 4:06 PM, Ron Shaar <[hidden email]> wrote:
sorry for being dumb, but could you please explain what should I do in this case?
Thanks you very much,
Ron.


On Wednesday, March 13, 2013 2:36:29 AM UTC-7, jelle feringa wrote:

If I were guessing, I'd say matplotlib depends on numpy, and your numpy installation was compiled against the math kernel library.  (Mkl). 

Stop guessing. That's how it is ;) 

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Daniel Hyams
[hidden email]



--
Daniel Hyams
[hidden email]

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: simple matplotlib example on mac with pyinstaller

Ron Shaar
In reply to this post by dhyams

The file libmkl_core.dylib is already in my pyinstaller directory, so I dont need to move it manually.

So, why do I get the message:
MKL FATAL ERROR: Cannot load libmkl_core.dylib ?
and why does it happen only when Im moving the mouse cursor over the figure?


( also, my libmkl.dylib is found in:
/Library/Frameworks/Python.framework/Versions/7.1/lib/libmkl_core.dylib )



On Wednesday, March 13, 2013 1:12:47 PM UTC-7, dhyams wrote:
Ron:

Personally, I'm not sure.  The first step, to make sure that it works, is to find the mkl library on your system (probably something like libmkl.dylib or libmkl.so) and manually copy it to the directory that you packaged in (I'm assuming one-dir packaging here; if you didn't package one-dir, do so).  Then run, so see if you get the same error.


On Wed, Mar 13, 2013 at 4:06 PM, Ron Shaar <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Z3s2KjG4TLkJ">rons...@...> wrote:
sorry for being dumb, but could you please explain what should I do in this case?
Thanks you very much,
Ron.


On Wednesday, March 13, 2013 2:36:29 AM UTC-7, jelle feringa wrote:

If I were guessing, I'd say matplotlib depends on numpy, and your numpy installation was compiled against the math kernel library.  (Mkl). 

Stop guessing. That's how it is ;) 

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="Z3s2KjG4TLkJ">pyinstaller...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="Z3s2KjG4TLkJ">pyins...@....
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Daniel Hyams
<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Z3s2KjG4TLkJ">dhy...@...

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.