| Summary: | pybootchartgui.py has not been migrated to python3 | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] Meta-yocto | Reporter: | Humberto Ibarra <humberto.ibarra.lopez> |
| Component: | configuration | Assignee: | Leonardo Sandoval Gonzalez <leonardo.sandoval.gonzalez> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | brian.avery, poky.bs.watcher, poky.watcher |
| Version: | 2.3 | ||
| Target Milestone: | 2.3 M3 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
Humberto, Do you have the cairo python module installed? I tried just the --help command and worked fine. help also worked for me on ubuntu 14.04. I do have cairo installed as a python module. I have python3-cairo installed, what I don't have is the pycairo package for python2. Am I supposed to install python2 cairo package for this to work? I thought we were fully on python3 already. [humberto@localhost build]$ sudo dnf install python3-cairo Last metadata expiration check: 0:01:29 ago on Mon Jan 30 11:14:47 2017. Package python3-cairo-1.10.0-15.fc24.x86_64 is already installed, skipping. Dependencies resolved. Nothing to do. Complete! [humberto@localhost build]$ sudo dnf install pycairo Last metadata expiration check: 0:01:35 ago on Mon Jan 30 11:14:47 2017. Dependencies resolved. =================================================================================================================================================================================================================== Package Arch Version Repository Size =================================================================================================================================================================================================================== Installing: pycairo x86_64 1.10.0-4.fc24 fedora 481 k python-xpyb x86_64 1.3.1-6.fc24 fedora 138 k Transaction Summary =================================================================================================================================================================================================================== Install 2 Packages Total download size: 619 k Installed size: 2.2 M Is this ok [y/N]: N Operation aborted. [humberto@localhost build]$ python3 Python 3.5.1 (default, Sep 19 2016, 10:16:17) [GCC 6.1.1 20160621 (Red Hat 6.1.1-3)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import cairo >>> quit() [humberto@localhost build]$ python Python 2.7.12 (default, Sep 29 2016, 13:30:34) [GCC 6.2.1 20160916 (Red Hat 6.2.1-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import cairo Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named cairo >>> quit() [humberto@localhost build]$ ../scripts/pybootchartgui/pybootchartgui.py -h Traceback (most recent call last): File "../scripts/pybootchartgui/pybootchartgui.py", line 20, in <module> from pybootchartgui.main import main File "/home/humberto/poky-skd/scripts/pybootchartgui/pybootchartgui/main.py", line 24, in <module> from . import batch File "/home/humberto/poky-skd/scripts/pybootchartgui/pybootchartgui/batch.py", line 16, in <module> import cairo ImportError: No module named cairo [humberto@localhost build]$ (In reply to comment #3) > I have python3-cairo installed, what I don't have is the pycairo package for > python2. Am I supposed to install python2 cairo package for this to work? I > thought we were fully on python3 already. > > [humberto@localhost build]$ sudo dnf install python3-cairo > Last metadata expiration check: 0:01:29 ago on Mon Jan 30 11:14:47 2017. > Package python3-cairo-1.10.0-15.fc24.x86_64 is already installed, skipping. > Dependencies resolved. > Nothing to do. > Complete! > [humberto@localhost build]$ sudo dnf install pycairo > Last metadata expiration check: 0:01:35 ago on Mon Jan 30 11:14:47 2017. > Dependencies resolved. > ============================================================================= > ============================================================================= > ========================================================= > Package Arch > Version Repository > Size > ============================================================================= > ============================================================================= > ========================================================= > Installing: > pycairo x86_64 > 1.10.0-4.fc24 fedora > 481 k > python-xpyb x86_64 > 1.3.1-6.fc24 fedora > 138 k > > Transaction Summary > ============================================================================= > ============================================================================= > ========================================================= > Install 2 Packages > > Total download size: 619 k > Installed size: 2.2 M > Is this ok [y/N]: N > Operation aborted. > [humberto@localhost build]$ python3 > Python 3.5.1 (default, Sep 19 2016, 10:16:17) > [GCC 6.1.1 20160621 (Red Hat 6.1.1-3)] on linux > Type "help", "copyright", "credits" or "license" for more information. > >>> import cairo > >>> quit() > [humberto@localhost build]$ python > Python 2.7.12 (default, Sep 29 2016, 13:30:34) > [GCC 6.2.1 20160916 (Red Hat 6.2.1-2)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import cairo > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > ImportError: No module named cairo > >>> quit() > [humberto@localhost build]$ ../scripts/pybootchartgui/pybootchartgui.py -h > Traceback (most recent call last): > File "../scripts/pybootchartgui/pybootchartgui.py", line 20, in <module> > from pybootchartgui.main import main > File > "/home/humberto/poky-skd/scripts/pybootchartgui/pybootchartgui/main.py", > line 24, in <module> > from . import batch > File > "/home/humberto/poky-skd/scripts/pybootchartgui/pybootchartgui/batch.py", > line 16, in <module> > import cairo > ImportError: No module named cairo > [humberto@localhost build]$ the shebang (#!) indicates python, and most distros python point to python 2 so you try installing the module on the latter: lsandov1@lsandov1-mobl2:~/poky$ which python /usr/bin/python lsandov1@lsandov1-mobl2:~/poky$ ls -la /usr/bin/python lrwxrwxrwx 1 root root 9 Mar 16 2015 /usr/bin/python -> python2.7 So, is this script expected to work with python2 and its libraries and not python3? If so, is there a mention to this in the documentation? I thought Mega-Manual marked Python3 as yocto dependency and python2 was added as an openembedded dependency. So, is this script part of openembedded? If this script is meant to be run with python2, I find it weird that I got this issue in the first place. Is cairo module not installed by default with python2? Not sure if the user is supposed to have or install this library on his own or if it should be mentioned in the manual as a dependency. Leonardo told me that there was no place to put dependencies for the scripts in scripts/ folder. Closing this. |
Ran pyboothchartgui.py help expecting to get more info on the command, however I found myself with the following error: [humberto@localhost build]$ ../scripts/pybootchartgui/pybootchartgui.py --help Traceback (most recent call last): File "../scripts/pybootchartgui/pybootchartgui.py", line 20, in <module> from pybootchartgui.main import main File "/home/humberto/poky-meta-yocto/scripts/pybootchartgui/pybootchartgui/main.py", line 24, in <module> from . import batch File "/home/humberto/poky-meta-yocto/scripts/pybootchartgui/pybootchartgui/batch.py", line 16, in <module> import cairo ImportError: No module named cairo It seems like this is caused because pybootchartgui hasn't been migrated to python3 yet.