A Python package cannot install

tumbleweed 20201119

When installing this week’s update, the error below occurred. Trying “Install unconditionally” did not make a difference.

I am not clear why a “devel” package is being installed. An error?

Subprocess failed. Error: RPM failed: error: unpacking of archive failed on file /usr/share/sip/PyQt5: cpio: File from package already exists as a directory in system

 error: python3-qt5-devel-5.15.1-2.1.x86_64: install failed
 error: python-qt5-common-devel-5.15.1-1.1.noarch: erase skipped

“File from package already exists as a directory” does indeed exist.

Some questions about that problem, f. e.:
https://forums.opensuse.org/showthread.php/547336-Error-On-Update-quot-Installation-of-python3-qt5-devel-5-15-1-2-1-x86_64-failed-quot

Okay. The recommendation in the other thread to remove that directory allowed the package to install.

I am not sure if this problem is solved with deleting python-qt5-common-devel. I followed the instructions and deleted the package and on today’s zypper dup I had again this error message that installing of package python3-qt5-devel-5.15.1-2.1.x86_64 failed. I selected ignore and the install proceeded without problems. But why is this coming up again? Will it come upt again next time when I do a zypper dup?

GO to yast do a search for the package using ‘required by’ to see what is requiring the package

It is not required by anything according to Yast - nevertheless it appeared when I used zypper dup this morning. Of course I can lock it but I just keep an eye out if it comes in again with the next zypper dup. Just now it wasn’t listed when I tried.

I would expect that package would be used for code development.
Do you have any Developer IDE’s installed?
Have you used any tools that help you code Python?

TSU

No - I am not an IT person (even though I manage our little 6 computer network (5 openSUSE Leap 15.2 and 1 TUmbleweed) for our little business and private use) and I don’t understand much of programming. But amonng the many python packages I found 2 other devel packages: python-sip-devel and python38-devel. No Idea what they are for though.

The packages with “devel” appended to the main package name are for situations where something wants a modified version instead of the standard package. A program would then perform some sort of “build” to create the new, custom version.

I guess in theory another package or an app might want your devel packages but if I were to guess, it’s just an oversight by a developer forgetting to exclude these files when their finished work is contributed to the distribution repository.

TSU

Please stop guessing. Check the MLs for info. This was a bug and is fixed now

I have 2 machines, both upgraded to 20201119. ‘erlangen’ has package python3-qt5-devel-5.15.1-2.1.x86_64 installed, while ‘3400G’ doesn’t have it. Find out who is requiring it by running:

erlangen:~ # zypper remove --clean-deps --dry-run python3-qt5-devel 
Reading installed packages... 
Resolving package dependencies... 

The following 78 packages are going to be REMOVED: 
  Mesa-KHR-devel Mesa-libEGL-devel Mesa-libGL-devel dbus-1-devel dbus-1-glib-devel libQt5Concurrent-devel libQt5Core-devel libQt5DBus-devel libQt5DesignerComponents5 libQt5Gui-devel libQt5Network-devel libQt5OpenGL-devel libQt5PlatformHeaders-devel libQt5PrintSupport-devel libQt5Quick3D5 
  libQt5Quick3DAssetImport5 libQt5Sql-devel libQt5Test-devel libQt5WebKit5-devel libQt5WebKitWidgets-devel libQt5Widgets-devel libQt5Xml-devel libX11-devel libXau-devel libXext-devel libXrandr-devel libXrender-devel libassimp5 libdrm-devel libgcrypt-devel libglvnd-devel libgpg-error-devel 
  libpulse-devel libqscintilla2_qt5-15 libqt5-linguist libqt5-linguist-devel libqt5-qtbase-common-devel libqt5-qtbase-devel libqt5-qtconnectivity-devel libqt5-qtdeclarative-devel libqt5-qtdeclarative-tools libqt5-qtdoc-qch libqt5-qtlocation-devel libqt5-qtmultimedia-devel 
  libqt5-qtquick3d-devel libqt5-qtquick3d-tools libqt5-qtsensors-devel libqt5-qtserialport-devel libqt5-qtspeech-devel libqt5-qtsvg-devel libqt5-qttools libqt5-qttools-devel libqt5-qttools-doc libqt5-qttools-qhelpgenerator libqt5-qtwebchannel-devel libqt5-qtwebengine-devel 
  libqt5-qtwebsockets-devel libqt5-qtx11extras-devel libqt5-qtxmlpatterns-devel libxcb-devel libxcb-screensaver0 libxcb-xf86dri0 libxcb-xtest0 libxcb-xvmc0 libxml2-devel libxslt-devel python-dbus-python-common-devel python3-dbus-python-devel python3-qscintilla-qt5 python3-qt5-devel 
  python3-qtwebengine-qt5-sip qscintilla2_qt5 readline-devel vulkan-devel vulkan-headers wayland-devel xorgproto-devel xz-devel 

78 packages to remove. 
After the operation, 258.8 MiB will be freed. 
Continue? [y/n/v/...? shows all options] (y):  
erlangen:~ # 
  • Short answer: One of the packages listed for removal requires it. When ‘zypper dist-upgrade’ paused with the above error I aborted. Then I ran ‘rm -r /usr/share/sip/PyQt5’ and again ‘zypper dist-upgrade’, which now succeeded.
  • Long answer: Not needed.

Ah. I was unclear.
The solution was to remove the PyQt5 directory; it is apparently a leftover from a previous re-structuring. Then install python3-qt5-devel.