OpenWrt Forum Archive

Topic: python ImportError: File not found

The content of this topic has been archived on 28 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Dear,

I have problem with python on openwrt:

root@OpenWrt:~/test# python2 testlcd.py
Traceback (most recent call last):
  File "testlcd.py", line 3, in <module>
    import pylcdlib
  File "/root/test/pylcdlib.py", line 2, in <module>
    import smbus
ImportError: File not found

root@OpenWrt:~/test# env
SSH_CLIENT=10.0.0.11 37979 22
USER=root
SHLVL=1
OLDPWD=/root
HOME=/root
SSH_TTY=/dev/pts/0
PS1=\u@\h:\w\$
LOGNAME=root
TERM=xterm
PATH=/usr/sbin:/usr/bin:/sbin:/bin
SHELL=/bin/ash
PWD=/root/test
SSH_CONNECTION=10.0.0.11 37979 10.100.100.1 22
PYTHONPATH=/usr/lib/python2.7/site-packages

could you please tell me what is wrong?

root@OpenWrt:/# find . -name smbus*
./root/test/smbus.so
./usr/lib/python2.7/site-packages/smbus.so

Could you please tell me how I can create python libs for RPi?
SDK should be enough or do I need something else?
Is there any tutorial for dummies how to build from sources the ipk packages for OpenWRT?

The discussion might have continued from here.