Using Python

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using Python

4,104 Views
hansenmike
Contributor II

I have Yocto running on my imx6qpsabresd dev board.  I need to run some python algorithms.  Python is installed but I need to add a lot of modules (i.e. numpy).  On an Ubuntu system, I could use pip install.  This doesn't work.  How do I get pip installed.  Again on Ubuntu, I think I use apt-get.  I think the equivalent on Yocto is smart?  Can I use that to install PIP?  and how?

Also, I need to download and run OpenCV and OpenCL and call the APIs from Python.  How do I do that and build the library so that it leverages the GPU on the imx6qp chip?

Labels (2)
Tags (2)
0 Kudos
5 Replies

2,380 Views
hansenmike
Contributor II

Can you elaborate on

You can install pip by using the python-pip recipe?

Do you mean I have to rebuild the image?  Or is this something I can run directly from a terminal window on the imx6 dev board?

0 Kudos

2,379 Views
hansenmike
Contributor II

nevermind.  I found out how to install pip.  Need to get smart setup correctly with a Host server and then can install pip.

0 Kudos

2,379 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Mike Hansen,

There are several Python modules available as part of the BSP. You can do a quick search of the available modules using the command:

bitbake –s | grep python

You can install pip by using the python-pip recipe.

There are some packages for OpenCV as well, but I’ll have to check how the API is called from Python. There is an OpenCV library for Python but I haven’t seen it on the BSP. I’ll let you know if I find more information on this.

Regards,

0 Kudos

2,379 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Mike Hansen,

The documents I found on using OpenCV that use Python are run on Ubuntu. You can see the setup on the following document.

Setting Up OpenCV in i.MX6 Based Boards
https://community.nxp.com/docs/DOC-331941

Interfacing Depth Sensors with ROS on NXP i.MX6 boards
https://community.nxp.com/docs/DOC-330334

Once installed you can run the python code importing the cv2 library, which corresponds to OpenCV and you should also be able to use OpenCL the same way,  but I’m not sure if using Ubuntu on your board would be an option and I’m afraid we do not have much documentation on using OpenCV and OpenCL using Python.

Regards,

0 Kudos

2,379 Views
hansenmike
Contributor II

I might prefer to install Ubuntu on my imx6qpsabresd, but I can't find correct documentation on how to do this.  Can you help with that?  Then I'll just switch to Ubuntu.  It's much easier than Yocto.

0 Kudos