XBMC has it's own python interpreter inside of it.
From this built in interpreter I need to run a script on the local machine python(i.e. the system python).
I call os.system("python myScript.py")
but I get back the error in my system error:
ImportError: No module named site
I was hoping for ideas of guidance on how to troubleshoot this issue. Is it even possible to do? I'm thinking it has something to do with the pythonpath/pythonhome variable.
If you can locate your XBMC python interpreter's path (I would imagine it has the same
python
and is located insidexbmc/bin/
or something similar), you could run that python version instead of the default one when runningpython
.Your code should like so:
Where both
python_fullpath
andscript_fullpath
, as the names imply, are full paths to those files.Like, for example: