krop and dependencies installs without error, but does not run

Bug #1864637 reported by Brian K. White on 2020-02-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
krop (Ubuntu)
Undecided
Unassigned

Bug Description

bkw@negre:~$ apt info krop
Package: krop
Version: 0.5.1+ds-1
Priority: optional
Section: universe/utils
Origin: Ubuntu
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: Alexandre Mestiashvili <email address hidden>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 148 kB
Depends: python3-distutils, python3-poppler-qt5, python3-pypdf2, python3:any
Homepage: http://arminstraub.com/software/krop
Download-Size: 22.4 kB
APT-Manual-Installed: yes
APT-Sources: http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 Packages
Description: tool to crop PDF files
 Krop is a simple graphical tool to crop the pages of PDF files.
 A unique feature of krop is its ability to automatically split
 pages into subpages to fit the limited screen size of devices such as
 eReaders. This is particularly useful, if your eReader does not support
 convenient scrolling.

bkw@negre:~$ krop
QApplication: invalid style override passed, ignoring it.
Traceback (most recent call last):
  File "/usr/share/krop/krop/vieweritem.py", line 21, in <module>
    from popplerqt5 import Poppler
ImportError: /usr/local/lib/python3.7/dist-packages/PyQt5/Qt/lib/libQt5Core.so.5: version `Qt_5.12' not found (required by /usr/lib/x86_64-linux-gnu/libpoppler-qt5.so.1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/krop", line 18, in <module>
    main()
  File "/usr/share/krop/krop/application.py", line 65, in main
    from krop.mainwindow import MainWindow
  File "/usr/share/krop/krop/mainwindow.py", line 39, in <module>
    from krop.vieweritem import ViewerItem
  File "/usr/share/krop/krop/vieweritem.py", line 24, in <module>
    raise RuntimeError(_msg)
RuntimeError: Please install popplerqt5 first.
bkw@negre:~$

I get the same error when I try to build from git clone

Alex (mestia) wrote :

It looks like you python env is messed up. Why does it look for python modules in /usr/local?

Brian K. White (brian-aljex) wrote :
Download full text (3.7 KiB)

Indeed, why does it? There are files under /usr/local/lib/python2.7 and 3.7, probably the result of pip and pip3?, but so what? Why isn't anything else broken by their existense?

I don't see any python-related variables in my env exept:
PYTHONPYCACHEPREFIX=/var/cache/python

"python" resolves to:
bkw@negre:~$ which python
/usr/bin/python
bkw@negre:~$ python --version
Python 2.7.17
bkw@negre:~$ dpkg -S /usr/bin/python
python-minimal: /usr/bin/python
bkw@negre:~$
bkw@negre:~$ apt show python-minimal
Package: python-minimal
Version: 2.7.17-1
Priority: optional
Section: universe/python
Source: python-defaults
Origin: Ubuntu
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: Matthias Klose <email address hidden>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 44.0 kB
Depends: python2.7-minimal (>= 2.7.17~rc1-1~), dpkg (>= 1.13.20), python2-minimal (= 2.7.17-1)
Recommends: python
Conflicts: python-central
Breaks: idle (<< 2.6), python (<= 2.7.3-1~), python-all (<< 2.6), python-all-dbg (<< 2.6), python-all-dev (<< 2.6), python-dbg (<< 2.6), python-dev (<< 2.6), python-examples (<< 2.6), python-support (<< 1.0.10ubuntu2), python2.5-minimal (<< 2.5.5-7), python2.6-minimal (<< 2.6.5~rc2-2), python3.1-minimal (<< 3.1.2~rc1-2)
Replaces: python (<= 2.7.3-1~)
Homepage: https://www.python.org/
Task: xubuntu-desktop, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop
Download-Size: 5,996 B
APT-Manual-Installed: no
APT-Sources: http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 Packages
Description: minimal subset of the Python2 language
 This package contains the interpreter and some essential modules. It's used
 in the boot process for some basic tasks.
 See /usr/share/doc/python2.7-minimal/README.Debian for a list of the modules
 contained in this package.

bkw@negre:~$

---------------

"python3" resolves to:

bkw@negre:~$ which python3
/usr/bin/python3
bkw@negre:~$ python3 --version
Python 3.7.5
bkw@negre:~$ dpkg -S /usr/bin/python3
python3-minimal: /usr/bin/python3
bkw@negre:~$ apt show python3-minimal
Package: python3-minimal
Version: 3.7.5-1
Priority: important
Section: python
Source: python3-defaults
Origin: Ubuntu
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: Matthias Klose <email address hidden>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 124 kB
Pre-Depends: python3.7-minimal (>= 3.7.5~rc1-1~)
Depends: dpkg (>= 1.13.20)
Homepage: https://www.python.org/
Task: minimal, ubuntu-desktop-minimal-default-languages, ubuntu-desktop-minimal-default-languages, ubuntu-desktop-minimal-default-languages, ubuntu-desktop-minimal-default-languages, ubuntu-desktop-minimal-default-languages, ubuntu-desktop-minimal-default-languages, ubuntu-desktop-minimal-default-languages, ubuntu-desktop-default-languages, ubuntu-desktop-default-languages, ubuntu-desktop-default-languages, ubuntu-desktop-default-languages, ubuntu-desktop-default-languages, ubuntu-desktop-default-languages, ubuntu-desktop-default-languages, ubuntu-desktop-default-languages, ubuntu-core
Supported: 9m
Download-Size: 23.3 kB
AP...

Read more...

Alex (mestia) wrote :

python2 is not relevant, since krop is python3 only.
The problem can be narrowed down to this code:

 echo -e "from popplerqt5 import Poppler" | python3.7

On my system it loads python3-pyqt5 libs from /usr/lib/python3/dist-packages/PyQt5.
May be try to play with PYTHONPATH to force python3 to pickup modules from /usr/lib/python3. Also in general I'd suggest to avoid using pip as root, install python modules locally with --user flag.

Best,
Alex

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers