0

Problem: I have a local rpm package with lots of out of date python packages which I cannot install from the package manager. Thus, I installed them with pip. But rpm still complains that the dependencies cannot be fulfilled, it doesn't finds the python packages from pip.

Expectation: I want to somehow communicate to rpm where the installed python packages are stored so that it finds all dependencies of my rpm package.

My setup:

  • SUSE Linux Enterprise Server 12 SP4
  • python2-pip
  • a rpm package which is stored locally on my machine
  • lots of weird versions of python packages, some of those are not even existing in their newest version in the official repos of (Open)SUSE
6
  • 1
    Just a note that all python 2 packages are now technically out of date as python 2 reached end-of-life at the start of 2020. – Philip Couling Mar 6 '20 at 16:40
  • It is not the packet-manager, that "communicates". It is pip. So concentrate on searching how to setup pip environments. As fas as i got it, pip installs into your home. So you would have to edit the/some system python/pip configuration to have a look there. Hacky! – WGRM Mar 6 '20 at 16:41
  • 1
    @WGRM pip will install to the home directory by default but there is a highly discouraged sudo pip install ... which I believe installs to the system libraries. – Philip Couling Mar 6 '20 at 16:49
  • I wouldn't do it either. I wouldn't even install anything but youtube-dl. At least until i have a working firejail config! ;) – WGRM Mar 6 '20 at 16:53
  • @user398976 I suspect there won't be good answers to this question because what you're trying to achieve isn't really a good idea. You might be able to create some dummy RPMs of your own to trick yum into thinking the python packages aren't installed. Beyond that you are better to setup a clean python environment and trying to install program you want (from an RPM) without yum at all. – Philip Couling Mar 6 '20 at 17:01
1

You are mixing up two unrelated package magament systems (RPM and pip). They are not designed to communicate, use different models. It could be done, but it is better to have just one and not a hairball of separate systems that somewhat agree.

2
  • Ok, but is there no way to give rpm a path to look into for searching the required python packages? They are installed on my system after all. I should also add that I installed them with sudo pip install... (I know, bad). – user398976 Mar 8 '20 at 16:08
  • You have two methods: write a shim RPM to virtually provide the version of the binary the pip installs, and update it in lock-step; or use pyp2rpm (better than fpm) to launder your pips to RPMs and get them into the supply chain. They may need help with the requirements advertising, but that will drop off with incremental fixes. Raise awareness and donate the spec back up the channel so the devs will package better too, so you don't have to. – user2066657 May 7 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.