Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
Sammyo
Posts: 3
Registered: ‎12-05-2011
My Device: BB9900
Accepted Solution

How to resolve Python message

[ Edited ]

I'm hoping someone has seen this and found a work-around...

 

I am building a C project (just the sample code) / note that these errors to not prevent the code from compiling

 

Every time I compile I get the following message:

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File ImportError: No module named os

 

Environment: 

- QNX® Momentics IDE for BlackBerry® Native SDK for Tablet OS - Version: 2.0.0 - Build id: 201111142158

- OS: uname -a == Linux Box 3.0.0-13-generic-pae #22-Ubuntu SMP Wed Nov 2 15:17:35 UTC 2011 i686 i686 i386 GNU/Linux

- Python 2.7.2+

 

Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: How to resolve Python message

Sammyo, are you trying to build something using the Python interpreter, on purpose?

 

Or is this just some side-effect of your build process that you never even expected?

 

You say your "environment" includes Python 2.7.2+... what's telling you that?  The IDE, as far as I know, doesn't use Python, so I assume that's something installed on your own system, separately?

 

There is a Python 2.5 installation of some sort, for reasons unknown to me, in the \host\win32\x86\unsupported folder in the beta 2.0 NDK, but since you've mentioned 2.7 I don't know if that's related to your problem.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
New Contributor
Sammyo
Posts: 3
Registered: ‎12-05-2011
My Device: BB9900

Re: How to resolve Python message

Peter, all I did was create a project using the wizard (BlackBerry Tablet OS C/C++ Project).  This automatically generated some C code - a small application, with some utility functions.  I've not modified the source code in any way.  The reason I mentioned the Python was just to indicate that Python was actually installed on the Linux box.

 

After compiling, I've been having fairly consistent problems getting the executable to get to push to simulator.  The error I get from the push is a time out.  (It works randomly once and a while.)  So I figured I'd attack the problems that I observed one at a time.

 

I am not doing anything directly with Python; the Python error message I get shows up in the console window.  After more investigation, I've noticed that it the error does not happen at the compile stage, but at the "launch" stage.  I'm wondering if this message is actually gennerated by the simulator, here is a transcript for when the application actually does launch:



Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Traceback (most recent call last):
File ImportError: No module named os
MsgNak received - resending
Remote target is little-endian
[New pid 3559515 tid 2]
warning: Could not load shared library symbols for libHwEGL.so.1.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for libegl_gallium.so.1.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for libpipe_vmwgfx_drv.so.1.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for libHwGLESv1_CM.so.1.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for libst_HwGLESv1_CM.so.1.
Do you need "set solib-search-path" or "set sysroot"?

 

Thanks for any help you can provide!



Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: How to resolve Python message

Sammyo, you may want to try reinstalling the simulator, in case it's gotten messed up somehow.

The Python stuff, if it's on the sim, would presumably be the internal Python 2.7 install which the Tablet OS uses to manage system updates and app installation. I've never seen a problem with it, but I also haven't used the sim much with the NDK and maybe something's wrong with it.

You said this doesn't prevent it from compiling, but is it prevented it from launching? (I would imagine so, if the system Py 2.7 can't even find its os package, which is critical.)

The warnings afterwards look like stuff I've seen sometimes as well, and so far have mostly been able to ignore them.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
New Contributor
Sammyo
Posts: 3
Registered: ‎12-05-2011
My Device: BB9900

Re: How to resolve Python message

Peter, thanks so much for your help.

I reinstalled the simulator and that seems to have resolved the app launch issues.  (Though I still get exactly the same warnings.)

 

For those hitting the same problem - I think the difference may be that first I installed the simulator using the root user and the second time I installed the simulator as the user that would actually be running the simulator.