UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor zach.thorson
Visitor
340 Views
Registered: ‎07-09-2018

Upgrade Python on Petalinux 2018.1

In order to support a different meta package, I am attempting to add support for Python 3.7.3 to the build image of Petalinux 2018.1.  The idea is to attempt to replace the built in 3.5.3 version.

I appear to have successfully added python3 3.7.2 to the build image, as bitbake -s shows both version.

 

bitbake -s

python3                                           :3.5.3-r1.0                 :3.7.2-r0

Now, the issue is when I try to build the system, the original yocto image appears to not be able to see the newly added version.  

 

WARNING: You have included the meta-virtualization layer, but 'virtualization' has not been enabled in your DISTRO_FEATURES. Some bbappend files may not take effect. See the meta-virtualization README for details on enabling virtualization support.
Parsing recipes: 100% |############################################################################################| Time: 0:01:35
Parsing of 3005 .bb files complete (0 cached, 3005 parsed). 4014 targets, 185 skipped, 3 masked, 0 errors.
NOTE: preferred version 3.7% of python3 not available (for item python3-textutils)
NOTE: versions of python3 available: 3.5.3
NOTE: Resolving any missing task queue dependencies
NOTE: preferred version 3.7% of python3 not available (for item python3-sqlite3-tests)
NOTE: versions of python3 available: 3.5.3
NOTE: preferred version 3.7% of python3 not available (for item python3-signal)
NOTE: versions of python3 available: 3.5.3
NOTE: preferred version 3.7% of python3 not available (for item python3-textutils)
NOTE: versions of python3 available: 3.5.3
NOTE: preferred version 3.7% of python3 not available (for item python3-reprlib)
NOTE: versions of python3 available: 3.5.3
NOTE: preferred version 3.7% of python3 not available (for item python3-argparse)
NOTE: versions of python3 available: 3.5.3
NOTE: preferred version 3.7% of python3 not available (for item python3-re)
NOTE: versions of python3 available: 3.5.3
NOTE: preferred version 3.7% of python3 not available (for item python3-subprocess)
NOTE: versions of python3 available: 3.5.3
NOTE: preferred version 3.7% of python3 not available (for item python3-importlib)
NOTE: versions of python3 available: 3.5.3
NOTE: preferred version 3.7% of python3 not available (for item python3-enum)
NOTE: versions of python3 available: 3.5.3
NOTE: preferred version 3.7% of python3 not available (for item python3-lang)
NOTE: versions of python3 available: 3.5.3
NOTE: preferred version 3.7% of python3 not available (for item python3-readline)
NOTE: versions of python3 available: 3.5.3
NOTE: preferred version 3.7% of python3 not available (for item python3-selectors)
NOTE: versions of python3 available: 3.5.3
ERROR: Multiple versions of python3 are due to be built (/opt/pkg/petalinux/components/yocto/source/aarch64/layers/core/meta/recipes-devtools/python/python3_3.5.3.bb /home/user/Source/prj/petalinux/project-spec/meta-ros/recipes-devtools/python/python3_3.7.2.bb). Only one version of a given PN should be built in any given build. You likely need to set PREFERRED_VERSION_python3 to select the correct version or don't depend on multiple versions.

Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Looking through the petalinux layers and packages, I don't see any hard dependancies on certain versions of python3, so I'm not clear as to why it won't use 3.7.

 

I have also modified:/project-spec/meta-user/conf

PREFERRED_VERSION_python3 = "3.7%"

Though it acknowledges that this is the preferred version, it does not appear to make a difference.

 

As a final step, I also tried to increase the priority of the layer that contains python, so it loads before the core/meta layer.  In my meta-prj/conf/layer.conf I added the line below.  It doesn't look like priority in the base ever goes about ~8, so I tried a number of values higher than that:

BBFILE_PRIORITY_meta-prj = "100"

Long story short, is there a correct way to override the version of a base library included in a petalinux build using a standard layer?

0 Kudos
2 Replies
Visitor mborden
Visitor
250 Views
Registered: ‎06-12-2019

Re: Upgrade Python on Petalinux 2018.1

Did you ever have any luck with this? I'm running with Petalinux 2019.1, but there's still the same issue with only having Python 3.5.3 support in the Yocto Thud release that Petalinux depends on. There's Python 3.7.2 support in the Warrior branch but I haven't found anything indicating when that might be supported in the Petalinux releases. 

0 Kudos
Visitor zach.thorson
Visitor
226 Views
Registered: ‎07-09-2018

Re: Upgrade Python on Petalinux 2018.1

I never did get Python 3.7 integrated into the build.  I ended up moving to Petalinux 2019.1 with Python 3.5, which was new enough that I could use it for my application.

I may revisit it later as we upgrade more packages, so if you have any luck with it, I'd love to hear about it.

0 Kudos