[yocto] Problem with Python when running oe-init-build-env

Zoran Stojsavljevic zoran.stojsavljevic at gmail.com
Thu May 3 11:47:25 PDT 2018


Hello Ross,

Seems that you are correct. I have checked on my host Fedora 27:

[vuser at localhost bin]$ pwd
/usr/bin
[vuser at localhost bin]$ uname -r
4.16.5-200.fc27.x86_64
[vuser at localhost bin]$ ls -al pyth*
lrwxrwxrwx. 1 root root     7 Mar 14 14:36 python -> python2
lrwxrwxrwx. 1 root root     9 Mar 14 14:36 python2 -> python2.7
-rwxr-xr-x. 1 root root  7128 Mar 14 14:37 python2.7
lrwxrwxrwx. 1 root root     9 Apr  4 17:03 python3 -> python3.6
-rwxr-xr-x. 2 root root 11240 Apr  4 17:03 python3.6
-rwxr-xr-x. 2 root root 11240 Apr  4 17:03 python3.6m
-rwxr-xr-x. 1 root root   388 Jul 28  2017 python3-chardetect
-rwxr-xr-x. 1 root root   387 Nov 16 18:05 python3-coverage
-rwxr-xr-x. 1 root root   396 Jul 28  2017 python3-mako-render
-rwxr-xr-x. 1 root root   392 Jul 28  2017 python3-pyinotify
[vuser at localhost bin]$

I also have checked on my Debian 9.4.0 VM:

user at unassigned-hostname:/usr/bin$ pwd
/usr/bin
user at unassigned-hostname:/usr/bin$ uname -r
4.9.0-6-amd64
user at unassigned-hostname:/usr/bin$ ls -al pyth*
lrwxrwxrwx 1 root root       9 May  3 11:03 python -> python2.7
lrwxrwxrwx 1 root root       9 May  3 11:03 python2 -> python2.7
-rwxr-xr-x 1 root root 3779512 Nov 24 12:33 python2.7
lrwxrwxrwx 1 root root       9 May  3 11:03 python3 -> python3.5
-rwxr-xr-x 2 root root 4747120 Jan 19  2017 python3.5
-rwxr-xr-x 2 root root 4747120 Jan 19  2017 python3.5m
lrwxrwxrwx 1 root root      10 May  3 11:03 python3m -> python3.5m
user at unassigned-hostname:/usr/bin$

Zoran
_______


On Thu, May 3, 2018 at 6:00 PM, Burton, Ross <ross.burton at intel.com> wrote:

> I suggest you have a look through the feed that you link to and see if it
> provides a package which has /usr/bin/python3 in, and if it doesn't then
> just make a python3 -> python3.6 symlink (which is all you need).
>
> Ross
>
> On 2 May 2018 at 20:28, Raymond Yeung <rksyeung at hotmail.com> wrote:
>
>> Thanks Zoran.
>>
>>
>> My Linux build machine uses Centos 7.  I thought I'd done the
>> installation to Python 3.6.5.  If this is not Python3 > 3.4.0, then I'm
>> confused.  The link I follow for installation is here:
>> https://janikarhunen.fi/how-to-install-python-3-6-1-on-centos-7.html
>>
>> > python3.6 -V
>>
>> Python 3.6.5
>>
>> >python -V
>>
>> Python 2.7.5
>>
>>
>> Anyway, I realize what went wrong.  I'd Krogoth (a 2016 Poky) running
>> before.  Now as I'm migrating to Rocko (a 2017 Poky), I try to solve a
>> Python versioning issue by installing Python only (as above).  However,
>> there may be other packages I need to update.  After getting latest
>> Reference Manual, download and install latest environment, I no longer have
>> python3 issue.  However, the Python version of why Python3.6 won't satisfy
>> Python > 3.4.0 still puzzles me (though no longer blocking me).
>>
>>
>> Raymond
>>
>>
>> ------------------------------
>> *From:* Zoran Stojsavljevic <zoran.stojsavljevic at gmail.com>
>> *Sent:* Tuesday, May 1, 2018 11:19 PM
>> *To:* Raymond Yeung
>> *Cc:* yocto at yoctoproject.org
>> *Subject:* Re: [yocto] Problem with Python when running oe-init-build-env
>>
>> Hello Raymond,
>>
>> The problem is that you (talking about your host distro):
>> [1] Do NOT have python3 package installed;
>> [2] Do have python3 package < 3.4.0 version, so you need to upgrade!
>>
>> So, I have no idea which host distro you are using, but:
>> [1] If Debian/Ubuntu, then: apt-get install python3
>>      If Fedora, then dnf install python3
>> [2] If Debian/Ubuntu, then: apt-get update python3
>>      If Fedora, then dnf update python3
>>
>> Hope this helps,
>> Zoran
>> _______
>>
>> On Tue, May 1, 2018 at 10:43 PM, Raymond Yeung <rksyeung at hotmail.com>
>> wrote:
>> > I'd just git cloned Rocko and meta-ti.  When I try to source
>> > oe-init-build-env, I got errors:
>> >
>> >
>> > -bash: python3: command not found
>> >
>> > BitBake requires Python 3.4.0 or later as 'python3'.  "python -V" gives
>> > "Python 2.7.9".  "python3" is not in $PATH.  I'd followed some detailed
>> > online description to install Python 3.6 on CentOS 7.  However, after
>> > installation, it looks like I need to invoke it with python3.6.
>> >
>> >
>> > How does this work now?  I suppose the oe-init-build-env script
>> uses/expects
>> > python3, not python3.6.
>> >
>> >
>> > Any insight?
>> >
>> >
>> > Raymond
>> >
>> >
>> > --
>> > _______________________________________________
>> > yocto mailing list
>> > yocto at yoctoproject.org
>> > https://lists.yoctoproject.org/listinfo/yocto
>> yocto Info Page <https://lists.yoctoproject.org/listinfo/yocto>
>> lists.yoctoproject.org
>> Discussion of all things about the Yocto Project. Read our Community
>> Guidelines or learn more about how to participate in other community
>> discussions. Subscribe before posting to bypass moderation.
>>
>>
>> >
>>
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto at yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20180503/979a24ec/attachment-0001.html>


More information about the yocto mailing list