Pythonista-Issues icon indicating copy to clipboard operation
Pythonista-Issues copied to clipboard

Update numpy version

Open n8henrie opened this issue 7 years ago • 19 comments
trafficstars

I'd love to see Pythonista include numpy >= 1.10, mostly so I can use the @ operator in code that I use on both Pythonista and on my computer.

n8henrie avatar Feb 22 '18 16:02 n8henrie

Work on that is underway, I'm not sure yet when it'll be done, but it's looking good so far.

omz avatar Feb 22 '18 16:02 omz

Thanks for the quick response! Psyched to use them in my little neural network -- crazy to live in a time that I can learn to build and run an MNIST classifier on my phone!

n8henrie avatar Feb 22 '18 17:02 n8henrie

I am new to Python and Pythonista, so this might be a stupid question. Is there either a way to update the version of numpy in the Standard Library, or to tell programs to import the updated version that I installed using StaSh? The program I am trying to run keeps pulling the version 1.8 numpy from the library instead of the 1.14 version inside of site-packages, then complains that I need to upgrade to at least numpy version 1.9. Any suggestions?

Tylerssmith avatar May 19 '18 13:05 Tylerssmith

@Tylerssmith No, it's not possible to update Pythonista's numpy yourself. Parts of numpy are implemented in native code, and iOS doesn't allow loading native code that isn't signed by the app developer. I don't know what happens exactly when you use Stash pip to install numpy, but I'm guessing it will only install the pure Python parts of numpy, which are not functional without the native parts.

dgelessus avatar May 19 '18 19:05 dgelessus

To omz/dgelessus: Follow on the same question of updating numpy. I downloaded Pythonista around June 2018 and am trying to use pandas when I get an error: this version of pandas is incompatible with numpy < 1.9.0. your numpy version is 1.8.0. Please upgrade numpy to >= 1.9.0 to use this pandas version Is there a way to update numpy 1.8.0 which was dated Oct. 2013? Thanks!

hyluo2017 avatar Jul 31 '18 19:07 hyluo2017

@hyluo2017 as far as I know, Pandas won't even work inside Pythonista, due to its native requirements. Have you had any success making it work inside it?

preslavrachev avatar Sep 11 '18 09:09 preslavrachev

I use astropy which relies on numpy version 1.13 or later - @omz, any update on whether implementing that is still in your roadmap for development?

mintakka avatar Jan 03 '19 20:01 mintakka

Also trying to import pandas without success. Would be nice to know if support for this is on the way.

IvarLJ avatar Jan 25 '19 17:01 IvarLJ

That would be issue #1 ... 🍺

cclauss avatar Jan 25 '19 17:01 cclauss

That would be issue #1 ... 🍺

Indeed. That’s what happens when you rely 100% on google results - should have searched here first...

IvarLJ avatar Jan 25 '19 17:01 IvarLJ

This Python IDE contains updated versions of NumPy (1.16.1), Matplotlib (3.0.2) and Pandas (0.24.1)

ColdGrub1384 avatar Feb 27 '19 12:02 ColdGrub1384

Hopefully the upcoming version will update numpy. There was a recent good point on the forums that so many great things depend on more recent versions of numpy, that an update would be a significant ”force multiplier”.

One example dependency is the pure Python static-frame, that could alleviate a lot of pandas pain.

mikaelho avatar Mar 31 '19 07:03 mikaelho

+1 on static frame https://talkpython.fm/episodes/show/204/staticframe-like-pandas-but-safer

Also see https://github.com/ColdGrub1384/Pyto for Python 3 on iOS with a more current NumPy

cclauss avatar Mar 31 '19 07:03 cclauss

Another +1 on static-frame. Especially, after the brilliant TPTM episode. Unfortunately, the NumPy running on Pythonista at the moment is 1.8, where static-frame would require at least 1.14

preslavrachev avatar Mar 31 '19 19:03 preslavrachev

Is there a reason, why pythonista cotains such an old version of numpy?

amiga23 avatar Mar 19 '20 21:03 amiga23

It's August 2020 and Pythonista's Numpy is still on 1.8 :-|

hanung665 avatar Aug 11 '20 01:08 hanung665

is there a way to upgrade NumPy to 1.15.4 and then import pandas successfully? Even after running. pip install numpy==1.15.4 from stash my numpy version remains 1.8 thanks

nVidiaPriyadarshini avatar May 12 '21 12:05 nVidiaPriyadarshini

no i don't think that will do it because it requires porting over some of the low-level changes to the way the system executes code, and only omz can edit that due to the nature of the iOS environment. This version of numpy is nearly unusably old (imho), and missing a lot of very basic features. Your best bet is either SSH into a computer, rooting your iPhone, or getting something like a linux phone like a pinephone and then you can run whatever code you want.

NGeorgescu avatar May 12 '21 13:05 NGeorgescu

ok. thanks for the note.

nVidiaPriyadarshini avatar May 12 '21 15:05 nVidiaPriyadarshini