Importing scipy package
I imported the scipy source package into the site-packages folder...what do I do now? A call to "import scipy.stats" gives me an error message:
ImportError: Error importing scipy: you cannot import scipy while
being in scipy source directory; please exit the scipy source
tree first, and relaunch your python intepreter.
Thing I don't understand is this happens from any folder that I am in and also from the console.
I'm quite new to Apple products and iPad. Could you please explain how you imported the scipy source into the site-packages directory?
dgelessus: thanks for the advice. I ran other scripts, forced quit pythonista, tried importing scipy from scripts in other folders, etc, etc. I still get this error. Any thoughts?
bergeom: I used the script posted in this thread by henryiii
Scipy has to be compiled, since most of it is written in C, not Python. Apple does not allow code to be compiled on iOS devices, so OMZ is the only one who can add scipy, pandas, etc. Try my script on a pure Python package.
PS: the next step would be to run "python setup.py build" from the command line if you were on a computer.
PPS: actually, much of scipy may be fortran, actually, now that I think of it. That is even harder to get to work, I think, because iOS is written in a C derivative.
Thanks henryiii...that makes sense...and thanks for the installer script by the way.
Do you know of any statistical pkgs that are pure Python?
There is quite a bit of pure python code in scipy so it is worth keeping a copy of it around and then just grabbing modules you need. One example is the wavfile module under io. This is to read / write wav files using numpy arrays. Just one example, but there is a lot of good stuff in there that is pure python.
I'd love scipy support. I'm looking to implement some of this stuff
Hi. 3 years later, and there is no support yet for scipy in Pythonista 3. I stated to migrate my work to Microsoft Azure Notebook, a Jupyther notebook host.
@jmbenedetto I think that's an absolutely valid approach. Pythonista is good at iOS stuff. There are things you can do with it that you can't do with other apps, but SciPy isn't among those things. If your main focus is the SciPy/pandas stack, you might be better off with a cloud-based solution.
@omz So I guess this means that we should not expect to see Pandas support in Pythonista. :-(