import Error
#1
Hi friends
sorry for my english

I am writing a script.
I would import libavg library.
but it gives error.
error : Error Type: exceptions.ImportError
ERROR: Error Contents: No module named libavg

libavg installed in my ubuntu (/usr/local/lib/python2.6/dist-packages/libavg/) and different python files inside is running.

help me please,thanks.
Reply
#2
From what I understand, XBMC Python runs in it's own environment, so scripts that work fine when executed from shell (in the normal os environment), may not work when executed in XBMC.

Basic libraries can be copied to your scripts folder, you can add directory's to your sys.path, etc. I'm sure you can bundle the required libraries into your addon but I couldn't get it working. However, a quick workaround to make your script execute in the environment you have developed it in is to execute it with the os.system("/yourscriptdir/yourscript.py") command.
Reply

Logout Mark Read Team Forum Stats Members Help
import Error0