Home/Support/Support Forum/launch python script
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

launch python script

0 votes
Hello everybody,

I test a digi card with yocto project, and in fact i've installed the digi image for yocto.

i see python is already install on this image , so after image installation, in FTP mode, i've forward my python file inside /home/myuser/

so i've /home/myuser/my_test_file_python.py

in SSH mode i'm log in root user and i set the next command :

python /home/myuser/my_test_file_python.py

=> i've the next error => Python : command not found.

So my question it will be ( excuse me per advance if it's a crazy question ) :

How i can lauch from yocto a python script ?

Thank a lot per advance for your return, and excuse my english, because i known it's not my most quality.

Thanks a lot,
co-IoT.
asked Jul 11 in Embedded Devices by coiot New to the Community (0 points)
recategorized Jul 12 by rmaroun
Hello all,

In fact it's ok for me i don't write :

phyton /home...


by i must write

phyton3.5 /home...

and it's ok my script is execute.

So now i don't now if someone use it, i would like to use the picamera on my digi card ( connect Core 6 SBC ) i had read on a website ( i don't remenber wich one sorry) that it was possible.

So,

on my raspberry pi i copy all the forlder picamera ( the library file in fact ) and i had paste in the same folder on the digi card. But in my python script when i execute it i've an error :

Traceback (most recent call last):
File "/home/user/test.py", line 7, in <module>
import picamera
ImportError: No module named 'picamera'

if somebody will be a little way for my problem, thanks a lot.

co-IoT.

Please log in or register to answer this question.

1 Answer

0 votes
The problem is exactly in the error message:
import picamera
ImportError: No module named 'picamera'

Thy python installation on SBC has no python library picamera. You'd have to get it either including in the zip with your python script or installing picamera manually, or install pip and install picamera via pip
answered Jul 18 by LeonidM Veteran of the Digi Community (2,380 points)
Hello, Thank you LeonidM,

yes the error message was clear.

in fact i copy and paste the directory "picamera" from my raspberrypi to my digi card and now i've a new error message very clear too:

ImportError : No Module named '_ctypes'

so i'm affraid than i will include lot of library manually each time i add new one.

so, i've downoalded on github picamera library and i see .zip file containt a python script setup.py, so i think, i can install this library via this script. i will must try it but i've a little proble with FTP server on my digi card but it's working last week so i will must look why.

Your message interest me because i see you purpose me other method for install library, and i would like try it.

i've read some article on pip i see what is this module but i don't understand how i can install it on yocto on my digi card. i'm very intersted to make that, if you can say me few information about it ?

than you per advance.

co-IoT
if you build your own Yocto images add this to your local.conf:
IMAGE_INSTALL_append = " python-pip"
note the space before p
on a running system you can try following:
https://pip.pypa.io/en/latest/installing/#install-pip
Contact a Digi expert and get started today! Contact Us
...