Trying to add support for Scipy

125 views
Skip to first unread message

Jules Gagnon-Marchand

unread,
Feb 27, 2014, 8:47:20 PM2/27/14
to python-...@googlegroups.com
Hello everyone,

I work as a researcher, and we need support for Scipy, so I was thinking of trying to add it.
Do you have any ideas as to how hard it would be to do? Was it tried before.

Thanks,
Jules.

Jules Gagnon-Marchand

unread,
Feb 27, 2014, 10:42:42 PM2/27/14
to python-...@googlegroups.com
So, the issue I'm having is that when my recipe tries to build Scipy, I get this message:

Traceback (most recent call last):
  File "setup.py", line 230, in <module>
    setup_package()
  File "setup.py", line 218, in setup_package
    from numpy.distutils.core import setup
  File "/home/kivy/android/python-for-android/build/python-install/lib/python2.7/site-packages/numpy/__init__.py", line 137, in <module>
    import add_newdocs
  File "/home/kivy/android/python-for-android/build/python-install/lib/python2.7/site-packages/numpy/add_newdocs.py", line 9, in <module>
    from numpy.lib import add_newdoc
  File "/home/kivy/android/python-for-android/build/python-install/lib/python2.7/site-packages/numpy/lib/__init__.py", line 4, in <module>
    from type_check import *
  File "/home/kivy/android/python-for-android/build/python-install/lib/python2.7/site-packages/numpy/lib/type_check.py", line 8, in <module>
    import numpy.core.numeric as _nx
  File "/home/kivy/android/python-for-android/build/python-install/lib/python2.7/site-packages/numpy/core/__init__.py", line 5, in <module>
    import multiarray

I have the feeling that it's because it's trying to run numpy binary libs (which are required for the scipy build) that were compiled with the arm compiler. Does anyone have a guess as to how to deal with this?
Thanks.
J.

Jules Gagnon-Marchand

unread,
Feb 27, 2014, 10:45:17 PM2/27/14
to python-...@googlegroups.com
The rest of the error message was missing from my previous post. Here it is :

ImportError: /home/kivy/android/python-for-android/build/python-install/lib/python2.7/site-packages/numpy/core/multiarray.so: cannot open shared object file: No such file or directory

Hubert Soyer

unread,
Feb 28, 2014, 12:51:30 AM2/28/14
to python-...@googlegroups.com

I think there is a numpy recipe already.
When I tried it recently it didn't work for me. I haven't spent many thoughts on it since my problem was simple and I went with cython instead. Maybe you can get it to work.

After that, you can specify numpy as a requirement in your recipe, I think that should make sure that numpy is present when scipy gets installed.

I'm new to p4a so take this with a grain of salt.

Jules Gagnon-Marchand

unread,
Feb 28, 2014, 8:17:57 AM2/28/14
to python-...@googlegroups.com, hubert...@googlemail.com
Thanks, but numpy is working for me.
What I'm talking about is Scipy, which is a different module and is build time dependant on numpy

Clinton Wang

unread,
Sep 20, 2016, 11:56:34 PM9/20/16
to Python For Android, hubert...@googlemail.com
Hello, are you able to get scipy cross-compiled for android ? I am having the same problem stucking at multiarray.so, which is a 32 bit built from numpy recipe.

Alexander Taylor

unread,
Sep 30, 2016, 7:47:26 AM9/30/16
to Python For Android, hubert...@googlemail.com
Getting scipy to work is likely to be extremely complex or (maybe essentically impossible) in places, due to the fortran components, but I'm not familiar with its build process or if some parts might work. If you want to discuss it, I suggest asking on the kivy irc channel and/or opening an issue on the python-for-android github tracker about it if there is not one already.

Jules Gagnon-Marchand

unread,
Oct 3, 2016, 1:55:58 AM10/3/16
to python-...@googlegroups.com
People are installing scipy onto their rasperry pies and the such. I would investigate if the way that is done could be transposed to Android.
--
You received this message because you are subscribed to a topic in the Google Groups "Python For Android" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python-android/wZTwqBFBGgQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python-android+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages