Can I use python3 in wp76xx module

Could you specify the exact file I should download please?

have you followed the steps to run python3 in RAM ?

I already fixed those file and make but it was error. I don’t understand that what do you mean run python3 in RAM.



have you followed the steps here?

You can follow the steps below to run python3:

  1. download the yocto source and go to ./meta-swi/meta-swi-mdm9x28/recipes-core/images/mdm9x28-image.inc
  2. add the following line:
    IMAGE_INSTALL_append = " python3"
  3. go to ./meta-swi/meta-swi-mdm9x28/conf/machine/swi-mdm9x28.conf
    change UBI_ROOTFS_SIZE ?= “48MiB”
  4. Make the yocto image ( there will be error to make the image, but we can build the binary of python3)
  5. on PC, type :
    sudo ifconfig usb0 192.168.2.3
  6. on module, type :
    mkdir /tmp/tmp_usr_bin/;mkdir /tmp/tmp_usr_bin_wr;
    mount -t overlay overlay /usr/bin -o lowerdir=/usr/bin,upperdir=/tmp/tmp_usr_bin,workdir=/tmp/tmp_usr_bin_wr;
    mkdir /tmp/tmp_usr_include/;mkdir /tmp/tmp_usr_include_wr;
    mount -t overlay overlay /usr/include -o lowerdir=/usr/include,upperdir=/tmp/tmp_usr_include,workdir=/tmp/tmp_usr_include_wr;
    mkdir /tmp/tmp_usr_lib/;mkdir /tmp/tmp_usr_lib_wr;
    cp -rf /usr/lib/* /tmp/tmp_usr_lib/
    mount -t overlay overlay /usr/lib -o lowerdir=/usr/lib,upperdir=/tmp/tmp_usr_lib,workdir=/tmp/tmp_usr_lib_wr;
    mkdir /usr/lib/python3.5
  7. on PC, type :
    scp -r ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/python3/3.5.5-r1.0/image/usr/include/* root@192.168.2.2:/usr/include
    scp -r ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/python3/3.5.5-r1.0/image/usr/bin/* root@192.168.2.2:/usr/bin
    scp ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/python3/3.5.5-r1.0/image/usr/lib/libpython3.5m.so ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/python3/3.5.5-r1.0/image/usr/lib/libpython3.5m.so.1.0 ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/python3/3.5.5-r1.0/image/usr/lib/libpython3.so root@192.168.2.2:/usr/lib
    scp -r ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/python3/3.5.5-r1.0/image/usr/lib/pkgconfig root@192.168.2.2:/usr/lib
    scp -r ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/python3/3.5.5-r1.0/image/usr/lib/python3.5/encodings/ root@192.168.2.2:/usr/lib/python3.5
    scp ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/python3/3.5.5-r1.0/image/usr/lib/python3.5/*.py root@192.168.2.2:/usr/lib/python3.5
  8. now on module, you can use python3:
    root@swi-mdm9x28-wp:~# python3
    Could not find platform dependent libraries <exec_prefix>
    Consider setting $PYTHONHOME to [:<exec_prefix>]
    Python 3.5.5 (default, Oct 24 2019, 07:42:55)
    [GCC 7.3.0] on linux
    Type “help”, “copyright”, “credits” or “license” for more information.

Do you mean this one??

yes, have you tried that?

wp7605 has stoped while copied file in no.7

scp -r ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/python3/3.5.5-r1.0/image/usr/lib/python3.5/encodings/ root@192.168.2.2:/usr/lib/python3.5
scp ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/python3/3.5.5-r1.0/image/usr/lib/python3.5/*.py


root@192.168.2.2:/usr/lib/python3.5

are you testing on R13.3?
I don’t see problem
Why does it stop?
Is it not enough memory?

I have tried it again and it okay but it still get same error with python @.@

then you need to debug it, it can already run python3

I think it because I haven’t install this one yet. Then how can I install it to wp7605 module?
install.txt (556 Bytes)

I don’t know, never try that before
I only tried python3 before

how to setting “$PYTHONHOME”??

you can google the answer

it not work :sweat:

root@swi-mdm9x28-wp:~# export PYTHONHOME='usr/bin/python3'
root@swi-mdm9x28-wp:~# python3
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'

Current thread 0xb6cc8010 (most recent call first):
Aborted

this is different error message…
did you transfer this library?
./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/python3/3.5.5-r1.0/image/usr/lib/python3.5/encodings/

yes,I am.

seems problem starts after you type
export PYTHONHOME=‘usr/bin/python3’

yes,I was. python also cannot use. I have to reboot the module and install again.
still get “Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to [:<exec_prefix>]”

root@swi-mdm9x28-wp:~# python3
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python 3.5.5 (default, Mar 31 2022, 03:43:27) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()  
root@swi-mdm9x28-wp:~# export $PYTHONHOME='/usr/lib/python3.5'
-sh: export: : bad variable name
root@swi-mdm9x28-wp:~# export PYTHONHOME='/usr/lib/python3.5'
root@swi-mdm9x28-wp:~# python3
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'

Current thread 0xb6d5a010 (most recent call first):
Aborted
root@swi-mdm9x28-wp:~# python
ImportError: No module named site
root@swi-mdm9x28-wp:~# 

what is the actual problem of getting “Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to [:<exec_prefix>]”