Export to GitHub

python-for-android - issue #5

libpython2.6.so not found


Posted on Mar 10, 2011 by Happy Bird

What steps will reproduce the problem? 1. Install Py4A. 2. Install the interpreter. 3. Launch the interactive interpreter from the SL4A list.

What is the expected output? What do you see instead?

Expected: interpreter console prompt Actual: "Python started" notification, followed immediately by "Python exited" notification. logcat shows return code 255.

What version of the product are you using? On what operating system? r4 or r5, on Android 1.5

Please provide any additional information below.

Copying libpython2.6.so to /system/lib resolves the issue. Possible reason: LD_LIBRARY_PATH only contains /system/lib.

On Py4A version r1, the interpreter works fine without copying libpython2.6.so to /system/lib, but the same issue occurs when attempting to install a Python/C module like pybluez; there, "import bluetooth" fails with a link error saying that libpython2.6.so cannot be found. I haven't tested whether copying libpython2.6.so to /system/lib fixes this problem with r1, since doing it with r4 solved both problems for me.

Comment #1

Posted on Mar 20, 2011 by Swift Horse

This does not appear to be a problem with later versions of Android (1.6 or greater)

I would not be surpised to find there were issues with bluetooth in 1.5, because the sl4a bluetooth libs are only available for sdk level 7 and about (2.1 from memory)

It would be pretty easy to add to the LD_LIBRARY_PATH if you can confirm this is the issue.

However, I know sl4a will not be making strenuous efforts to stay backwards compatible with 1.5 from now on... unless someone else wants to make the effort to keep it so.

Comment #2

Posted on Jul 7, 2011 by Quick Wombat

Why don't you install the python standalone package???

Comment #3

Posted on Jul 7, 2011 by Happy Bird

That would be step "2. Install the interpreter."

At any rate, I can confirm that this isn't an issue with 2.3.4, so I'm not looking back. Feel free to close this.

Comment #4

Posted on Apr 3, 2012 by Swift Horse

(No comment was entered for this change.)

Status: Done

Labels:
Type-Defect Priority-Medium