pyephem: error on _libastro.so

118 views
Skip to first unread message

Ricochet

unread,
May 9, 2012, 6:46:22 AM5/9/12
to Py4A
Hello,

I have installed epehm on my HTC. Then I fixed a first issue: the
_libastro.so was not extracted from the .egg, so I have manually place
it into /mtn/sdcard/com.googlecode.pythonforandroid/extras/python/
ephem

It is now found but I have the following error:
ImportError: cannot load library: load_segment[933]: 6725 failed to
map segment from '_libastro.so" @ 0x80400000....etc...

What did I do wrong?

Thank you for your advice.

Robbie Matthews

unread,
Jul 3, 2012, 7:39:59 PM7/3/12
to python-fo...@googlegroups.com
WHat version of Python are you running?

Robbie

On Wed, Jul 4, 2012 at 12:55 AM, Toblerone <aarons...@gmail.com> wrote:
I am having the exact same problem on my HTC Rezound.

_libastro.so is not automatically extracted, and when I manually place the file at the same location I get almost an identical error.

Has anybody managed to find a workaround for this little snag, or is pyephem on android broken for the time being?



--

Beginning Android Tablet Programming

  • Publication Date: November 2, 2011
  • ISBN13: 978-1-4302-3783-9

Robbie Matthews gives a full, no-holds barred introduction to Android  programming for tablets. No previous experience required! Learn More …

Beginning Android Tablet Programming


Toblerone

unread,
Jul 3, 2012, 10:28:23 PM7/3/12
to python-fo...@googlegroups.com
- I am using the latest interpreter (v16), extras (v14) and scripts (v13) according to the Python for Android UI.

- The Pyephem package is named pyephem-3.7.4.1-py2.6-linux-armv.egg (as far as I can tell it's the latest available "precompiled" for android).

- The Phone is an HTC Rezound running an ICS leak (have been on each leaked firmware since March without any issues of this sort).

Thanks for your help, I'd really like to help get this issue resolved, especially if it's affecting others.  Pyephem is a powerful resource on Android.



On Tuesday, July 3, 2012 5:39:59 PM UTC-6, Robbie wrote:
WHat version of Python are you running?

Robbie

Robbie Matthews

unread,
Jul 3, 2012, 10:52:59 PM7/3/12
to python-fo...@googlegroups.com
Python 2.6.2 ?

Robbie

Toblerone

unread,
Jul 3, 2012, 11:03:51 PM7/3/12
to python-fo...@googlegroups.com
It looks like it would be Python 2.6.2, though I am unsure of how to test that as I've yet to be able to run a Python shell on the phone itself.

I have not modified the stock SL4A or Python for Android installations aside from importing the Pyephem package through the UI and manually installing _libastro.so.


On Tuesday, July 3, 2012 8:52:59 PM UTC-6, Robbie wrote:
Python 2.6.2 ?

Robbie

Robbie Matthews

unread,
Jul 4, 2012, 1:11:02 AM7/4/12
to python-fo...@googlegroups.com
You really should be able to run a python script, ie:
import sys
print sys.version

If you can't run a python shell, it points to deeper problems.

Robbie

Me

unread,
Jul 4, 2012, 10:15:30 AM7/4/12
to python-fo...@googlegroups.com
I hadn't thought to try it that way as a script, but yes, it's 2.6.2.

If I should be able to run a python shell over adb, then yes, there is something else wrong.  I can run all of the various other scripts I have on my phone through the SL4A UI just fine, though.  Everything is working aside from Pyephem in that case...

Is there another version of Python I should be trying?

Thanks again for your help!

Robbie Matthews

unread,
Jul 4, 2012, 6:44:33 PM7/4/12
to python-fo...@googlegroups.com
No, that is the version the thing is compiled for.
Thought: did you use the all-in-one installer or the usual installer? If so, you may wish to try reinstalling with the other option. There are subtle differences with the way they handle eggs.

Robbie

Me

unread,
Jul 4, 2012, 7:47:13 PM7/4/12
to python-fo...@googlegroups.com
I actually figured out the problem after some fiddling today...

Once I classified both SL4A and PythonForAndroid as "Trusted" in LBE Privacy Guard, things started working.  I hadn't thought anything of it earlier, as I had allowed all permissions to both apps anyway and had never had a problem previously, but that apparently still messed up something.

Thanks for all the help, hopefully if somebody has this issue in the future hopefully this'll be of some help to them as well.
Reply all
Reply to author
Forward
0 new messages