Bug report pythonista v3.2 (matplotlib, python2)
QuickPiz last edited by
I have just upgraded pythonista to v3.2.
Unfortunately, this version broke pretty much all my scripts. :(
When I run something with matplotlib and python 2, pythonista crashes badly.
Even the simple example below crashes pythonista (if I use python 2) when it reaches the 'show' method. Python3 seems to work with this example (but I have way too much code to migrate to Python3 in the short run).
I need to find a way to downgrade pythonista to the previous version. Oh well.
Anyway, keep up the good work. This is an amazing IDE for iOS.
import numpy as np import matplotlib.pyplot as plt if __name__=='__main__': x,y,c = zip(*np.random.rand(30,3)*4-2) plt.plot(x,y,label="plop") plt.show()
JonB last edited by
if you can contact @omz and get a beta invite, this problem doesnt exist in the beta ( this has been a problem in the past, which was fixed, but i guess not in the released app store version)
dgelessus last edited by
A few other people have also reported this issue: https://github.com/omz/Pythonista-Issues/issues/502
I don't think switching to the beta would help - according to @omz, the current App Store version is almost identical to the last beta version. Even on build 311016 (which is one build older than the last beta build) the code from the OP crashes under Python 2.
omz last edited by omz
From what I've heard so far, the issue is limited to 2.7 mode, and I suspect that most beta testers are primarily using 3.6.
That would explain why the issue went unnoticed during testing. Sorry about the inconvenience! – I'll look into this in the next couple of days, and I hope to be able to provide a bugfix update soon, but right now I can only suggest using Python 3.6, perhaps in combination with Pythonista's 2to3 feature.
mauhcs last edited by
I had the same problem using mayplotlib.
But I was just trying again and I got an error instead of crashing.
The error message was:
ImportError: cannot import name multiarray
Anyway, I’ll try to run my scripts with python3 for now
QuickPiz last edited by
Thanks for the reply. Unfortunately, I have a lot of preexisting python2 code and switching to 3 is not an option in the short run. I will definitely consider the upgrade and check out pythonista's 2to3 as soon as I can afford this.