Discussion:
[Pyzo] matplotlib plots but mouse causes crash "Python has stopped working"
'blue2studio' via Pyzo
2016-12-01 18:49:32 UTC
Permalink
I am a new pyzo user,
great app pyzo, but I can't use matplotlib
I tried all the solutions I've seen on the web with no luck.

import matplotlib.pyplot as plt

import numpy as np

plt.ion()

x = np.arange(0, 4*np.pi, 0.1)

y = [np.sin(i) for i in x]

plt.plot(x, y, 'g-', linewidth=1.5, markersize=4)

#plt.show()

The plot works as expected, but
when I move the mouse over the plot that comes up,
it crashes with "Python has stopped working"
I did some debugging and it looks like its in
QtWidget.Qwiget.resizeEvent(self,event)
It does not seem to matter whether interactive mode or not.

I'm new, but I'm a newly retired software developer, C, C++, Python, etc.
I plan on doing major work in Python in the graphics area
rewriting 75K lines of TrackLab C application into a new PyLab -> PyTlab
extension
I'm also planning on using PyClips to write a Siri expert system.
Bob
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
a***@gmail.com
2016-12-02 10:31:27 UTC
Permalink
This looks like it could be a clash between different GUI toolkits. Is there any GUI toolkit integrated? I.e. does the shell say “This is the Pyzo interpreter with integrated event loop for XX”? If you’ve not already done so, you can try doing `conda install pyqt=4`.

Regards,
Almar

From: 'blue2studio' via Pyzo
Sent: 01 December 2016 19:49
To: Pyzo
Subject: [Pyzo] matplotlib plots but mouse causes crash "Python has stoppedworking"

I am a new pyzo user,
great app pyzo, but I can't use matplotlib
I tried all the solutions I've seen on the web with no luck.

import matplotlib.pyplot as plt
import numpy as np
plt.ion()
x = np.arange(0, 4*np.pi, 0.1)
y = [np.sin(i) for i in x]
plt.plot(x, y, 'g-', linewidth=1.5, markersize=4)
#plt.show()

The plot works as expected, but
when I move the mouse over the plot that comes up,
it crashes with "Python has stopped working"
I did some debugging and it looks like its in
QtWidget.Qwiget.resizeEvent(self,event)
It does not seem to matter whether interactive mode or not.

I'm new, but I'm a newly retired software developer, C, C++, Python,  etc.
I plan on doing major work in Python in the graphics area
rewriting 75K lines of TrackLab C application into a new PyLab -> PyTlab extension
I'm also planning on using PyClips to write a Siri expert system.
Bob
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'blue2studio' via Pyzo
2016-12-02 20:43:02 UTC
Permalink
The following works without pyzo
from windows> py tlab2.py

import matplotlib.pyplot as plt

import numpy as np


#plt.ion()

x = np.arange(0, 4*np.pi, 0.1)

y = [np.sin(i) for i in x]

plt.plot(x, y, 'g-', linewidth=1.5, markersize=4)

plt.show()


Note: I had to remove plt.ion() and put back plt.show()


When to plot comes up, everything works as expected.

I can open up the icons on the top and everything.

So, this bug has something to do with pyzo or conda but not python

I would be happy to dig in more and fix this

if someone can explain how events work in anaconda/pyzo


Bob
Post by a***@gmail.com
This looks like it could be a clash between different GUI toolkits. Is
there any GUI toolkit integrated? I.e. does the shell say “This is the Pyzo
interpreter with integrated event loop for XX”? If you’ve not already done
so, you can try doing `conda install pyqt=4`.
Regards,
Almar
*From: *'blue2studio' via Pyzo <javascript:>
*Sent: *01 December 2016 19:49
*To: *Pyzo <javascript:>
*Subject: *[Pyzo] matplotlib plots but mouse causes crash "Python has
stoppedworking"
I am a new pyzo user,
great app pyzo, but I can't use matplotlib
I tried all the solutions I've seen on the web with no luck.
import matplotlib.pyplot as plt
import numpy as np
plt.ion()
x = np.arange(0, 4*np.pi, 0.1)
y = [np.sin(i) for i in x]
plt.plot(x, y, 'g-', linewidth=1.5, markersize=4)
#plt.show()
The plot works as expected, but
when I move the mouse over the plot that comes up,
it crashes with "Python has stopped working"
I did some debugging and it looks like its in
QtWidget.Qwiget.resizeEvent(self,event)
It does not seem to matter whether interactive mode or not.
I'm new, but I'm a newly retired software developer, C, C++, Python, etc.
I plan on doing major work in Python in the graphics area
rewriting 75K lines of TrackLab C application into a new PyLab -> PyTlab extension
I'm also planning on using PyClips to write a Siri expert system.
Bob
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
a***@gmail.com
2016-12-03 11:17:53 UTC
Permalink
Pyzo can integrate a variety of GUI toolkit so that they can be used interactively (i.e. events get processed, but the shell keeps working too). Matplotlib supports a variety of GUI toolkits to render the figure in. The one that MPL is using should match with what Pyzo is using. If they use different ones, things can break hard sometimes. Mpl tends to default to PyQt4. That’s why I asked about what GUI toolkit is integrated in Pyzo. You can tell by what the shell prints out when it starts.

Regards,
Almar

From: 'blue2studio' via Pyzo
Sent: 02 December 2016 21:43
To: Pyzo
Subject: Re: [Pyzo] matplotlib plots but mouse causes crash "Python hasstoppedworking"

The following works without pyzo
from windows>   py tlab2.py

import matplotlib.pyplot as plt
import numpy as np

#plt.ion()
x = np.arange(0, 4*np.pi, 0.1)
y = [np.sin(i) for i in x]
plt.plot(x, y, 'g-', linewidth=1.5, markersize=4)
plt.show()

Note: I had to remove plt.ion() and put back plt.show()

When to plot comes up, everything works as expected.
I can open up the icons on the top and everything.
So, this bug has something to do with pyzo or conda but not python
I would be happy to dig in more and fix this
if someone can explain how events work in anaconda/pyzo

Bob


On Friday, December 2, 2016 at 2:31:28 AM UTC-8, Almar Klein wrote:
This looks like it could be a clash between different GUI toolkits. Is there any GUI toolkit integrated? I.e. does the shell say “This is the Pyzo interpreter with integrated event loop for XX”? If you’ve not already done so, you can try doing `conda install pyqt=4`.
 
Regards,
Almar
 
From: 'blue2studio' via Pyzo
Sent: 01 December 2016 19:49
To: Pyzo
Subject: [Pyzo] matplotlib plots but mouse causes crash "Python has stoppedworking"
 
I am a new pyzo user,
great app pyzo, but I can't use matplotlib
I tried all the solutions I've seen on the web with no luck.

import matplotlib.pyplot as plt
import numpy as np
plt.ion()
x = np.arange(0, 4*np.pi, 0.1)
y = [np.sin(i) for i in x]
plt.plot(x, y, 'g-', linewidth=1.5, markersize=4)
#plt.show()

The plot works as expected, but
when I move the mouse over the plot that comes up,
it crashes with "Python has stopped working"
I did some debugging and it looks like its in
QtWidget.Qwiget.resizeEvent(self,event)
It does not seem to matter whether interactive mode or not.

I'm new, but I'm a newly retired software developer, C, C++, Python,  etc.
I plan on doing major work in Python in the graphics area
rewriting 75K lines of TrackLab C application into a new PyLab -> PyTlab extension
I'm also planning on using PyClips to write a Siri expert system.
Bob
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
 
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'blue2studio' via Pyzo
2016-12-03 16:01:06 UTC
Permalink
Almar,
i'm using...
Python 3.5.2 |Anaconda custom (32-bit)| (default, Jul 5 2016, 11:45:57) on
Windows (32 bits).

This is the Pyzo interpreter with integrated event loop for PYQT5.

Using IPython 5.1.0 -- An enhanced Interactive Python.


I tried to install PYQT4 rather than PYQT5 but not sure how to do that with
pip.

This could also be an IPython 5.1.0 bug...MPL code works fine from
command> py <code>.py

I just need to add the plt.show() command and it works fine

Is there some way to run my code from another shell
Or How do I back out of Ipython? this bug seems to have something to do
with interactive mode

Bob
Post by a***@gmail.com
Pyzo can integrate a variety of GUI toolkit so that they can be used
interactively (i.e. events get processed, but the shell keeps working too).
Matplotlib supports a variety of GUI toolkits to render the figure in. The
one that MPL is using should match with what Pyzo is using. If they use
different ones, things can break hard sometimes. Mpl tends to default to
PyQt4. That’s why I asked about what GUI toolkit is integrated in Pyzo. You
can tell by what the shell prints out when it starts.
Regards,
Almar
*From: *'blue2studio' via Pyzo <javascript:>
*Sent: *02 December 2016 21:43
*To: *Pyzo <javascript:>
*Subject: *Re: [Pyzo] matplotlib plots but mouse causes crash "Python
hasstoppedworking"
The following works without pyzo
from windows> py tlab2.py
import matplotlib.pyplot as plt
import numpy as np
#plt.ion()
x = np.arange(0, 4*np.pi, 0.1)
y = [np.sin(i) for i in x]
plt.plot(x, y, 'g-', linewidth=1.5, markersize=4)
plt.show()
Note: I had to remove plt.ion() and put back plt.show()
When to plot comes up, everything works as expected.
I can open up the icons on the top and everything.
So, this bug has something to do with pyzo or conda but not python
I would be happy to dig in more and fix this
if someone can explain how events work in anaconda/pyzo
Bob
This looks like it could be a clash between different GUI toolkits. Is
there any GUI toolkit integrated? I.e. does the shell say “This is the Pyzo
interpreter with integrated event loop for XX”? If you’ve not already done
so, you can try doing `conda install pyqt=4`.
Regards,
Almar
*From: *'blue2studio' via Pyzo
*Sent: *01 December 2016 19:49
*To: *Pyzo
*Subject: *[Pyzo] matplotlib plots but mouse causes crash "Python has
stoppedworking"
I am a new pyzo user,
great app pyzo, but I can't use matplotlib
I tried all the solutions I've seen on the web with no luck.
import matplotlib.pyplot as plt
import numpy as np
plt.ion()
x = np.arange(0, 4*np.pi, 0.1)
y = [np.sin(i) for i in x]
plt.plot(x, y, 'g-', linewidth=1.5, markersize=4)
#plt.show()
The plot works as expected, but
when I move the mouse over the plot that comes up,
it crashes with "Python has stopped working"
I did some debugging and it looks like its in
QtWidget.Qwiget.resizeEvent(self,event)
It does not seem to matter whether interactive mode or not.
I'm new, but I'm a newly retired software developer, C, C++, Python, etc.
I plan on doing major work in Python in the graphics area
rewriting 75K lines of TrackLab C application into a new PyLab -> PyTlab extension
I'm also planning on using PyClips to write a Siri expert system.
Bob
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
a***@gmail.com
2016-12-05 09:44:00 UTC
Permalink
IIRC Matplotlib does not work with Pyqt5 yet. If you’re using conda, its easy to move to pyqt4 using “conda install pyqt=4”. My guess is that will make everything work fine. If you don’t care about interactive mode (I.e. its fine if the call to plt.show() blocks) then you can disable GUI integration all together.

In the shell configuration dialog you can specify a few things about the shell, like what interpreter is used the GUI toolkit to use, and whether IPython should be used.

I hope this gets you going,
Almar

From: 'blue2studio' via Pyzo
Sent: 03 December 2016 17:01
To: Pyzo
Subject: Re: [Pyzo] matplotlib plots but mouse causes crash "Pythonhasstoppedworking"

Almar,
i'm using...
Python 3.5.2 |Anaconda custom (32-bit)| (default, Jul 5 2016, 11:45:57) on Windows (32 bits).
This is the Pyzo interpreter with integrated event loop for PYQT5.
Using IPython 5.1.0 -- An enhanced Interactive Python.

I tried to install PYQT4 rather than PYQT5 but not sure how to do that with pip.
This could also be an IPython 5.1.0 bug...MPL code works fine from command>  py <code>.py
I just need to add the plt.show() command and it works fine
Is there some way to run my code from another shell
Or How do I back out of Ipython?    this bug seems to have something to do with interactive mode

Bob

On Saturday, December 3, 2016 at 3:17:54 AM UTC-8, Almar Klein wrote:
Pyzo can integrate a variety of GUI toolkit so that they can be used interactively (i.e. events get processed, but the shell keeps working too). Matplotlib supports a variety of GUI toolkits to render the figure in. The one that MPL is using should match with what Pyzo is using. If they use different ones, things can break hard sometimes. Mpl tends to default to PyQt4. That’s why I asked about what GUI toolkit is integrated in Pyzo. You can tell by what the shell prints out when it starts.
 
Regards,
  Almar
 
From: 'blue2studio' via Pyzo
Sent: 02 December 2016 21:43
To: Pyzo
Subject: Re: [Pyzo] matplotlib plots but mouse causes crash "Python hasstoppedworking"
 
The following works without pyzo
from windows>   py tlab2.py

import matplotlib.pyplot as plt
import numpy as np
 
#plt.ion()
x = np.arange(0, 4*np.pi, 0.1)
y = [np.sin(i) for i in x]
plt.plot(x, y, 'g-', linewidth=1.5, markersize=4)
plt.show()
 
Note: I had to remove plt.ion() and put back plt.show()
 
When to plot comes up, everything works as expected.
I can open up the icons on the top and everything.
So, this bug has something to do with pyzo or conda but not python
I would be happy to dig in more and fix this
if someone can explain how events work in anaconda/pyzo
 
Bob


On Friday, December 2, 2016 at 2:31:28 AM UTC-8, Almar Klein wrote:
This looks like it could be a clash between different GUI toolkits. Is there any GUI toolkit integrated? I.e. does the shell say “This is the Pyzo interpreter with integrated event loop for XX”? If you’ve not already done so, you can try doing `conda install pyqt=4`.
 
Regards,
Almar
 
From: 'blue2studio' via Pyzo
Sent: 01 December 2016 19:49
To: Pyzo
Subject: [Pyzo] matplotlib plots but mouse causes crash "Python has stoppedworking"
 
I am a new pyzo user,
great app pyzo, but I can't use matplotlib
I tried all the solutions I've seen on the web with no luck.

import matplotlib.pyplot as plt
import numpy as np
plt.ion()
x = np.arange(0, 4*np.pi, 0.1)
y = [np.sin(i) for i in x]
plt.plot(x, y, 'g-', linewidth=1.5, markersize=4)
#plt.show()

The plot works as expected, but
when I move the mouse over the plot that comes up,
it crashes with "Python has stopped working"
I did some debugging and it looks like its in
QtWidget.Qwiget.resizeEvent(self,event)
It does not seem to matter whether interactive mode or not.

I'm new, but I'm a newly retired software developer, C, C++, Python,  etc.
I plan on doing major work in Python in the graphics area
rewriting 75K lines of TrackLab C application into a new PyLab -> PyTlab extension
I'm also planning on using PyClips to write a Siri expert system.
Bob
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
 
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
 
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'blue2studio' via Pyzo
2016-12-05 19:08:27 UTC
Permalink
Almar,
Yes....that solves my problem thanks...

Maybe that dependency should be checked...
Does Pyzo include anything that can do dependency management?
What do people use for Pyqt5 for plotting?

Bob
Post by a***@gmail.com
IIRC Matplotlib does not work with Pyqt5 yet. If you’re using conda, its
easy to move to pyqt4 using “conda install pyqt=4”. My guess is that will
make everything work fine. If you don’t care about interactive mode (I.e.
its fine if the call to plt.show() blocks) then you can disable GUI
integration all together.
In the shell configuration dialog you can specify a few things about the
shell, like what interpreter is used the GUI toolkit to use, and whether
IPython should be used.
I hope this gets you going,
Almar
*From: *'blue2studio' via Pyzo <javascript:>
*Sent: *03 December 2016 17:01
*To: *Pyzo <javascript:>
*Subject: *Re: [Pyzo] matplotlib plots but mouse causes crash
"Pythonhasstoppedworking"
Almar,
i'm using...
Python 3.5.2 |Anaconda custom (32-bit)| (default, Jul 5 2016, 11:45:57) on
Windows (32 bits).
This is the Pyzo interpreter with integrated event loop for PYQT5.
Using IPython 5.1.0 -- An enhanced Interactive Python.
I tried to install PYQT4 rather than PYQT5 but not sure how to do that with pip.
This could also be an IPython 5.1.0 bug...MPL code works fine from
command> py <code>.py
I just need to add the plt.show() command and it works fine
Is there some way to run my code from another shell
Or How do I back out of Ipython? this bug seems to have something to do
with interactive mode
Bob
Pyzo can integrate a variety of GUI toolkit so that they can be used
interactively (i.e. events get processed, but the shell keeps working too).
Matplotlib supports a variety of GUI toolkits to render the figure in. The
one that MPL is using should match with what Pyzo is using. If they use
different ones, things can break hard sometimes. Mpl tends to default to
PyQt4. That’s why I asked about what GUI toolkit is integrated in Pyzo. You
can tell by what the shell prints out when it starts.
Regards,
Almar
*From: *'blue2studio' via Pyzo
*Sent: *02 December 2016 21:43
*To: *Pyzo
*Subject: *Re: [Pyzo] matplotlib plots but mouse causes crash "Python
hasstoppedworking"
The following works without pyzo
from windows> py tlab2.py
import matplotlib.pyplot as plt
import numpy as np
#plt.ion()
x = np.arange(0, 4*np.pi, 0.1)
y = [np.sin(i) for i in x]
plt.plot(x, y, 'g-', linewidth=1.5, markersize=4)
plt.show()
Note: I had to remove plt.ion() and put back plt.show()
When to plot comes up, everything works as expected.
I can open up the icons on the top and everything.
So, this bug has something to do with pyzo or conda but not python
I would be happy to dig in more and fix this
if someone can explain how events work in anaconda/pyzo
Bob
This looks like it could be a clash between different GUI toolkits. Is
there any GUI toolkit integrated? I.e. does the shell say “This is the Pyzo
interpreter with integrated event loop for XX”? If you’ve not already done
so, you can try doing `conda install pyqt=4`.
Regards,
Almar
*From: *'blue2studio' via Pyzo
*Sent: *01 December 2016 19:49
*To: *Pyzo
*Subject: *[Pyzo] matplotlib plots but mouse causes crash "Python has
stoppedworking"
I am a new pyzo user,
great app pyzo, but I can't use matplotlib
I tried all the solutions I've seen on the web with no luck.
import matplotlib.pyplot as plt
import numpy as np
plt.ion()
x = np.arange(0, 4*np.pi, 0.1)
y = [np.sin(i) for i in x]
plt.plot(x, y, 'g-', linewidth=1.5, markersize=4)
#plt.show()
The plot works as expected, but
when I move the mouse over the plot that comes up,
it crashes with "Python has stopped working"
I did some debugging and it looks like its in
QtWidget.Qwiget.resizeEvent(self,event)
It does not seem to matter whether interactive mode or not.
I'm new, but I'm a newly retired software developer, C, C++, Python, etc.
I plan on doing major work in Python in the graphics area
rewriting 75K lines of TrackLab C application into a new PyLab -> PyTlab extension
I'm also planning on using PyClips to write a Siri expert system.
Bob
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
a***@gmail.com
2016-12-05 20:05:25 UTC
Permalink
Well, conda resolved dependencies, but pyqt is an *optional* dependency for mpl, since it supports multiple GUI backends. So this is a rather special situation. I hope it will be fixed soon when MPL support pyqt5.

- Almar

From: 'blue2studio' via Pyzo
Sent: 05 December 2016 20:08
To: Pyzo
Subject: Re: [Pyzo] matplotlib plots but mouse causes crash"Pythonhasstoppedworking"

Almar,
Yes....that solves my problem thanks...

Maybe that dependency should be checked...
Does Pyzo include anything that can do dependency management?
What do people use for Pyqt5 for plotting?

Bob

On Monday, December 5, 2016 at 1:44:04 AM UTC-8, Almar Klein wrote:
IIRC Matplotlib does not work with Pyqt5 yet. If you’re using conda, its easy to move to pyqt4 using “conda install pyqt=4”. My guess is that will make everything work fine. If you don’t care about interactive mode (I.e. its fine if the call to plt.show() blocks) then you can disable GUI integration all together.
 
In the shell configuration dialog you can specify a few things about the shell, like what interpreter is used the GUI toolkit to use, and whether IPython should be used.
 
I hope this gets you going,
  Almar
 
From: 'blue2studio' via Pyzo
Sent: 03 December 2016 17:01
To: Pyzo
Subject: Re: [Pyzo] matplotlib plots but mouse causes crash "Pythonhasstoppedworking"
 
Almar,
i'm using...
Python 3.5.2 |Anaconda custom (32-bit)| (default, Jul 5 2016, 11:45:57) on Windows (32 bits).
This is the Pyzo interpreter with integrated event loop for PYQT5.
Using IPython 5.1.0 -- An enhanced Interactive Python.
 
I tried to install PYQT4 rather than PYQT5 but not sure how to do that with pip.
This could also be an IPython 5.1.0 bug...MPL code works fine from command>  py <code>.py
I just need to add the plt.show() command and it works fine
Is there some way to run my code from another shell
Or How do I back out of Ipython?    this bug seems to have something to do with interactive mode

Bob

On Saturday, December 3, 2016 at 3:17:54 AM UTC-8, Almar Klein wrote:
Pyzo can integrate a variety of GUI toolkit so that they can be used interactively (i.e. events get processed, but the shell keeps working too). Matplotlib supports a variety of GUI toolkits to render the figure in. The one that MPL is using should match with what Pyzo is using. If they use different ones, things can break hard sometimes. Mpl tends to default to PyQt4. That’s why I asked about what GUI toolkit is integrated in Pyzo. You can tell by what the shell prints out when it starts.
 
Regards,
  Almar
 
From: 'blue2studio' via Pyzo
Sent: 02 December 2016 21:43
To: Pyzo
Subject: Re: [Pyzo] matplotlib plots but mouse causes crash "Python hasstoppedworking"
 
The following works without pyzo
from windows>   py tlab2.py

import matplotlib.pyplot as plt
import numpy as np
 
#plt.ion()
x = np.arange(0, 4*np.pi, 0.1)
y = [np.sin(i) for i in x]
plt.plot(x, y, 'g-', linewidth=1.5, markersize=4)
plt.show()
 
Note: I had to remove plt.ion() and put back plt.show()
 
When to plot comes up, everything works as expected.
I can open up the icons on the top and everything.
So, this bug has something to do with pyzo or conda but not python
I would be happy to dig in more and fix this
if someone can explain how events work in anaconda/pyzo
 
Bob


On Friday, December 2, 2016 at 2:31:28 AM UTC-8, Almar Klein wrote:
This looks like it could be a clash between different GUI toolkits. Is there any GUI toolkit integrated? I.e. does the shell say “This is the Pyzo interpreter with integrated event loop for XX”? If you’ve not already done so, you can try doing `conda install pyqt=4`.
 
Regards,
Almar
 
From: 'blue2studio' via Pyzo
Sent: 01 December 2016 19:49
To: Pyzo
Subject: [Pyzo] matplotlib plots but mouse causes crash "Python has stoppedworking"
 
I am a new pyzo user,
great app pyzo, but I can't use matplotlib
I tried all the solutions I've seen on the web with no luck.

import matplotlib.pyplot as plt
import numpy as np
plt.ion()
x = np.arange(0, 4*np.pi, 0.1)
y = [np.sin(i) for i in x]
plt.plot(x, y, 'g-', linewidth=1.5, markersize=4)
#plt.show()

The plot works as expected, but
when I move the mouse over the plot that comes up,
it crashes with "Python has stopped working"
I did some debugging and it looks like its in
QtWidget.Qwiget.resizeEvent(self,event)
It does not seem to matter whether interactive mode or not.

I'm new, but I'm a newly retired software developer, C, C++, Python,  etc.
I plan on doing major work in Python in the graphics area
rewriting 75K lines of TrackLab C application into a new PyLab -> PyTlab extension
I'm also planning on using PyClips to write a Siri expert system.
Bob
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
 
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
 
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
 
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
j***@web.de
2018-06-12 09:02:04 UTC
Permalink
I have python 3.6.5 installed and try to use matplotlib with pyqt4 in debug
mode with interactive mode on.

import matplotlib.pyplot as plt

plt.ion()

fig = plt.figure()

plt.plot(training_data[0,:])

plt.plot(training_data[1,:])

# plt.show()

If I run the whole script everything works fine, but inside the debug mode
(using a breakpoint) and empty loading and not responding figure pops up
that is crashing python when I try to close it.
Meanwhile I can still use the integrated python shell at the current
breakpoint.
Currently I changed to TK, so the figures won't show up at all during
debugging but afterwards, however it would be nice to be able to plot
things at a certain breakpoint for debugging issues.
Any suggestions?

Jonas
Post by a***@gmail.com
Well, conda resolved dependencies, but pyqt is an *optional* dependency
for mpl, since it supports multiple GUI backends. So this is a rather
special situation. I hope it will be fixed soon when MPL support pyqt5.
- Almar
*From: *'blue2studio' via Pyzo <javascript:>
*Sent: *05 December 2016 20:08
*To: *Pyzo <javascript:>
*Subject: *Re: [Pyzo] matplotlib plots but mouse causes
crash"Pythonhasstoppedworking"
Almar,
Yes....that solves my problem thanks...
Maybe that dependency should be checked...
Does Pyzo include anything that can do dependency management?
What do people use for Pyqt5 for plotting?
Bob
IIRC Matplotlib does not work with Pyqt5 yet. If you’re using conda, its
easy to move to pyqt4 using “conda install pyqt=4”. My guess is that will
make everything work fine. If you don’t care about interactive mode (I.e.
its fine if the call to plt.show() blocks) then you can disable GUI
integration all together.
In the shell configuration dialog you can specify a few things about the
shell, like what interpreter is used the GUI toolkit to use, and whether
IPython should be used.
I hope this gets you going,
Almar
*From: *'blue2studio' via Pyzo
*Sent: *03 December 2016 17:01
*To: *Pyzo
*Subject: *Re: [Pyzo] matplotlib plots but mouse causes crash
"Pythonhasstoppedworking"
Almar,
i'm using...
Python 3.5.2 |Anaconda custom (32-bit)| (default, Jul 5 2016, 11:45:57) on
Windows (32 bits).
This is the Pyzo interpreter with integrated event loop for PYQT5.
Using IPython 5.1.0 -- An enhanced Interactive Python.
I tried to install PYQT4 rather than PYQT5 but not sure how to do that with pip.
This could also be an IPython 5.1.0 bug...MPL code works fine from
command> py <code>.py
I just need to add the plt.show() command and it works fine
Is there some way to run my code from another shell
Or How do I back out of Ipython? this bug seems to have something to do
with interactive mode
Bob
Pyzo can integrate a variety of GUI toolkit so that they can be used
interactively (i.e. events get processed, but the shell keeps working too).
Matplotlib supports a variety of GUI toolkits to render the figure in. The
one that MPL is using should match with what Pyzo is using. If they use
different ones, things can break hard sometimes. Mpl tends to default to
PyQt4. That’s why I asked about what GUI toolkit is integrated in Pyzo. You
can tell by what the shell prints out when it starts.
Regards,
Almar
*From: *'blue2studio' via Pyzo
*Sent: *02 December 2016 21:43
*To: *Pyzo
*Subject: *Re: [Pyzo] matplotlib plots but mouse causes crash "Python
hasstoppedworking"
The following works without pyzo
from windows> py tlab2.py
import matplotlib.pyplot as plt
import numpy as np
#plt.ion()
x = np.arange(0, 4*np.pi, 0.1)
y = [np.sin(i) for i in x]
plt.plot(x, y, 'g-', linewidth=1.5, markersize=4)
plt.show()
Note: I had to remove plt.ion() and put back plt.show()
When to plot comes up, everything works as expected.
I can open up the icons on the top and everything.
So, this bug has something to do with pyzo or conda but not python
I would be happy to dig in more and fix this
if someone can explain how events work in anaconda/pyzo
Bob
This looks like it could be a clash between different GUI toolkits. Is
there any GUI toolkit integrated? I.e. does the shell say “This is the Pyzo
interpreter with integrated event loop for XX”? If you’ve not already done
so, you can try doing `conda install pyqt=4`.
Regards,
Almar
*From: *'blue2studio' via Pyzo
*Sent: *01 December 2016 19:49
*To: *Pyzo
*Subject: *[Pyzo] matplotlib plots but mouse causes crash "Python has
stoppedworking"
I am a new pyzo user,
great app pyzo, but I can't use matplotlib
I tried all the solutions I've seen on the web with no luck.
import matplotlib.pyplot as plt
import numpy as np
plt.ion()
x = np.arange(0, 4*np.pi, 0.1)
y = [np.sin(i) for i in x]
plt.plot(x, y, 'g-', linewidth=1.5, markersize=4)
#plt.show()
The plot works as expected, but
when I move the mouse over the plot that comes up,
it crashes with "Python has stopped working"
I did some debugging and it looks like its in
QtWidget.Qwiget.resizeEvent(self,event)
It does not seem to matter whether interactive mode or not.
I'm new, but I'm a newly retired software developer, C, C++, Python, etc.
I plan on doing major work in Python in the graphics area
rewriting 75K lines of TrackLab C application into a new PyLab -> PyTlab extension
I'm also planning on using PyClips to write a Siri expert system.
Bob
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Almar Klein
2018-06-14 08:14:25 UTC
Permalink
Hi Jonas,

By default, Pyzo does not keep the event loop updated during debugging,
because that might be counterproductive for the debugging process. You
can run "db events" to do a loop iteration to get the figures updated.
There is an environment variable (see the shell config) to make Pyzo do
this automatically.

- Almar
Post by j***@web.de
I have python 3.6.5 installed and try to use matplotlib with pyqt4 in
debug mode with interactive mode on.
import matplotlib.pyplot as plt
plt.ion()
fig = plt.figure()
plt.plot(training_data[0,:])
plt.plot(training_data[1,:])
# plt.show()
If I run the whole script everything works fine, but inside the debug
mode (using a breakpoint) and empty loading and not responding figure
pops up that is crashing python when I try to close it.
Meanwhile I can still use the integrated python shell at the current
breakpoint.
Currently I changed to TK, so the figures won't show up at all during
debugging but afterwards, however it would be nice to be able to plot
things at a certain breakpoint for debugging issues.
Any suggestions?
Jonas
Well, conda resolved dependencies, but pyqt is an *optional*
dependency for mpl, since it supports multiple GUI backends. So
this is a rather special situation. I hope it will be fixed soon
when MPL support pyqt5.
-Almar
*From: *'blue2studio' via Pyzo <javascript:>
*Sent: *05 December 2016 20:08
*To: *Pyzo <javascript:>
*Subject: *Re: [Pyzo] matplotlib plots but mouse causes
crash"Pythonhasstoppedworking"
Almar,
Yes....that solves my problem thanks...
Maybe that dependency should be checked...
Does Pyzo include anything that can do dependency management?
What do people use for Pyqt5 for plotting?
Bob
IIRC Matplotlib does not work with Pyqt5 yet. If you’re using
conda, its easy to move to pyqt4 using “conda install pyqt=4”.
My guess is that will make everything work fine. If you don’t
care about interactive mode (I.e. its fine if the call to
plt.show() blocks) then you can disable GUI integration all
together.
In the shell configuration dialog you can specify a few things
about the shell, like what interpreter is used the GUI toolkit
to use, and whether IPython should be used.
I hope this gets you going,
  Almar
*From: *'blue2studio' via Pyzo
*Sent: *03 December 2016 17:01
*To: *Pyzo
*Subject: *Re: [Pyzo] matplotlib plots but mouse causes crash
"Pythonhasstoppedworking"
Almar,
i'm using...
Python 3.5.2 |Anaconda custom (32-bit)| (default, Jul 5 2016,
11:45:57) on Windows (32 bits).
This is the Pyzo interpreter with integrated event loop for PYQT5.
Using IPython 5.1.0 -- An enhanced Interactive Python.
I tried to install PYQT4 rather than PYQT5 but not sure how to
do that with pip.
This could also be an IPython 5.1.0 bug...MPL code works fine
from command>  py <code>.py
I just need to add the plt.show() command and it works fine
Is there some way to run my code from another shell
Or How do I back out of Ipython?    this bug seems to have
something to do with interactive mode
Bob
Pyzo can integrate a variety of GUI toolkit so that they
can be used interactively (i.e. events get processed, but
the shell keeps working too). Matplotlib supports a
variety of GUI toolkits to render the figure in. The one
that MPL is using should match with what Pyzo is using. If
they use different ones, things can break hard sometimes.
Mpl tends to default to PyQt4. That’s why I asked about
what GUI toolkit is integrated in Pyzo. You can tell by
what the shell prints out when it starts.
Regards,
  Almar
*From: *'blue2studio' via Pyzo
*Sent: *02 December 2016 21:43
*To: *Pyzo
*Subject: *Re: [Pyzo] matplotlib plots but mouse causes
crash "Python hasstoppedworking"
The following works without pyzo
from windows>   py tlab2.py
import matplotlib.pyplot as plt
import numpy as np
#plt.ion()
x = np.arange(0, 4*np.pi, 0.1)
y = [np.sin(i) for i in x]
plt.plot(x, y, 'g-', linewidth=1.5, markersize=4)
plt.show()
Note: I had to remove plt.ion() and put back plt.show()
When to plot comes up, everything works as expected.
I can open up the icons on the top and everything.
So, this bug has something to do with pyzo or conda but not python
I would be happy to dig in more and fix this
if someone can explain how events work in anaconda/pyzo
Bob
This looks like it could be a clash between different
GUI toolkits. Is there any GUI toolkit integrated?
I.e. does the shell say “This is the Pyzo interpreter
with integrated event loop for XX”? If you’ve not
already done so, you can try doing `conda install pyqt=4`.
Regards,
Almar
*From: *'blue2studio' via Pyzo
*Sent: *01 December 2016 19:49
*To: *Pyzo
*Subject: *[Pyzo] matplotlib plots but mouse causes
crash "Python has stoppedworking"
I am a new pyzo user,
great app pyzo, but I can't use matplotlib
I tried all the solutions I've seen on the web with no
luck.
import matplotlib.pyplot as plt
import numpy as np
plt.ion()
x = np.arange(0, 4*np.pi, 0.1)
y = [np.sin(i) for i in x]
plt.plot(x, y, 'g-', linewidth=1.5, markersize=4)
#plt.show()
The plot works as expected, but
when I move the mouse over the plot that comes up,
it crashes with "Python has stopped working"
I did some debugging and it looks like its in
QtWidget.Qwiget.resizeEvent(self,event)
It does not seem to matter whether interactive mode or not.
I'm new, but I'm a newly retired software developer,
C, C++, Python,  etc.
I plan on doing major work in Python in the graphics area
rewriting 75K lines of TrackLab C application into a
new PyLab -> PyTlab extension
I'm also planning on using PyClips to write a Siri
expert system.
Bob
--
You received this message because you are subscribed
to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving
emails from it, send an email to
For more options, visit
https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to
the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the
Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google
Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it,
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...