OpenCV with python3


Peter Balazovic <balazovic.peter@...>
 

Hello all,

I have python module of OpenCV for python 2.7 on my Yocto image adding via local.conf

IMAGE_INSTALL_append += “ python-opencv”

Can you advice how to add opencv binding for python 3?

Thanks.


Robert P. J. Day
 

On Thu, 15 Mar 2018, Peter Balazovic wrote:

Hello all,
I have python module of OpenCV for python 2.7 on my Yocto image adding via local.conf

IMAGE_INSTALL_append += “ python-opencv”
i know i've harped on this before, but can people please stop
combining the constructs "_append" and "+=" in the same expression?

rday


Tim Orling
 

Ditto for Robert’s comment. Please look at the bitbake manual and understand what the syntax means [1].

Also,  “python-foo” means the python2 version. The default PACKAGECONFIG [2] for opencv builds for python3. You need “python3-opencv”.

Finally, I would encourage you to use CORE_IMAGE_EXTRA_INSTALL [3] rather than IMAGE_INSTALL in the local.conf context.


On Thu, Mar 15, 2018 at 5:57 AM Robert P. J. Day <rpjday@...> wrote:
On Thu, 15 Mar 2018, Peter Balazovic wrote:

> Hello all,
> I have python module of OpenCV for python 2.7 on my Yocto image adding via local.conf
>
> IMAGE_INSTALL_append += “ python-opencv”

  i know i've harped on this before, but can people please stop
combining the constructs "_append" and "+=" in the same expression?

rday--
_______________________________________________
yocto mailing list
yocto@...
https://lists.yoctoproject.org/listinfo/yocto


Peter Balazovic <balazovic.peter@...>
 

That I was thinking to have “python3-opencv” but it's failing to build

I found opencv_3.1.bbappend with my sources where I see

PACKAGECONFIG_remove_imx = "eigen python3"

I guess that might causing a problem to build opencv for python3... I'll remove and check again to build.
 
BTW what's the benefit of using CORE_IMAGE_EXTRA_INSTALL over IMAGE_INSTALL_append ?


On Fri, Mar 16, 2018 at 6:29 AM, Tim Orling <ticotimo@...> wrote:
Ditto for Robert’s comment. Please look at the bitbake manual and understand what the syntax means [1].

Also,  “python-foo” means the python2 version. The default PACKAGECONFIG [2] for opencv builds for python3. You need “python3-opencv”.

Finally, I would encourage you to use CORE_IMAGE_EXTRA_INSTALL [3] rather than IMAGE_INSTALL in the local.conf context.


On Thu, Mar 15, 2018 at 5:57 AM Robert P. J. Day <rpjday@...> wrote:
On Thu, 15 Mar 2018, Peter Balazovic wrote:

> Hello all,
> I have python module of OpenCV for python 2.7 on my Yocto image adding via local.conf
>
> IMAGE_INSTALL_append += “ python-opencv”

  i know i've harped on this before, but can people please stop
combining the constructs "_append" and "+=" in the same expression?

rday--
_______________________________________________
yocto mailing list
yocto@...
https://lists.yoctoproject.org/listinfo/yocto


Peter Balazovic <balazovic.peter@...>
 

By allowing "python3-opencv" I end up with errors ....

ERROR: fsl-image-qt5-1.0-r0 do_rootfs: python3-opencv not found in the feeds .
ERROR: fsl-image-qt5-1.0-r0 do_rootfs: This is often caused by an empty package declared in a recipe's PACKAGES variable. (Empty packages are not constructed unless ALLOW_EMPTY_<pkg> = '1' is used.)
ERROR: fsl-image-qt5-1.0-r0 do_rootfs: Function failed: do_rootfs

where to look at on problem?


On Fri, Mar 16, 2018 at 8:09 AM, Peter Balazovic <balazovic.peter@...> wrote:
That I was thinking to have “python3-opencv” but it's failing to build

I found opencv_3.1.bbappend with my sources where I see

PACKAGECONFIG_remove_imx = "eigen python3"

I guess that might causing a problem to build opencv for python3... I'll remove and check again to build.
 
BTW what's the benefit of using CORE_IMAGE_EXTRA_INSTALL over IMAGE_INSTALL_append ?


On Fri, Mar 16, 2018 at 6:29 AM, Tim Orling <ticotimo@...> wrote:
Ditto for Robert’s comment. Please look at the bitbake manual and understand what the syntax means [1].

Also,  “python-foo” means the python2 version. The default PACKAGECONFIG [2] for opencv builds for python3. You need “python3-opencv”.

Finally, I would encourage you to use CORE_IMAGE_EXTRA_INSTALL [3] rather than IMAGE_INSTALL in the local.conf context.


On Thu, Mar 15, 2018 at 5:57 AM Robert P. J. Day <rpjday@...> wrote:
On Thu, 15 Mar 2018, Peter Balazovic wrote:

> Hello all,
> I have python module of OpenCV for python 2.7 on my Yocto image adding via local.conf
>
> IMAGE_INSTALL_append += “ python-opencv”

  i know i've harped on this before, but can people please stop
combining the constructs "_append" and "+=" in the same expression?

rday--
_______________________________________________
yocto mailing list
yocto@...
https://lists.yoctoproject.org/listinfo/yocto



Khem Raj
 

On Thu, Mar 15, 2018 at 10:29 PM, Tim Orling <ticotimo@gmail.com> wrote:
Ditto for Robert’s comment. Please look at the bitbake manual and understand
what the syntax means [1].

Also, “python-foo” means the python2 version. The default PACKAGECONFIG [2]
for opencv builds for python3. You need “python3-opencv”.

Finally, I would encourage you to use CORE_IMAGE_EXTRA_INSTALL [3] rather
than IMAGE_INSTALL in the local.conf context.
FYI This suggestion is fine, however it is not sufficient. There is an
inherent assumption that image
is inheriting core-image which is implied and not explicitly
mentioned. many users do not inherit
core-image hence this suggestion will be moot for them.