Ipython fails to install

The ipython package fails to install on a fully up-to-date Rocky 9.1 system. I get the error:

Problem: conflicting requests

  • nothing provides python3.9dist(pygments) >= 2.4 needed by python3-ipython-8.5.0-1.el9.1.noarch
    (try to add ‘–skip-broken’ to skip uninstallable packages or ‘–nobest’ to use not only best candidate packages)

I’m not sure if this is a Rocky specific problem or something from upstream (I’m guessing an upstream issue).

I’m not sure if there is a way around this - “–nobest” doesn’t fix it, and presumable “–skip-broken” will just skip trying to install it.

Has anyone else come across this, or can anyone suggest a solution (Google hasn’t found anything for this problem for my searches so far)

Answering my own question, after a bit of digging, the necessary dependency is in the “CRB” repository. As someone relatively new to Rocky, it wasn’t immediately obvious that to install ipython (which I assume is in a repository that is enabled by default) it is necessary to enable another repository that isn’t enabled by default.

For anyone else hitting this in future, the file to edit is /etc/yum.repos.d/rocky.repo, and change “enabled=0” to “enabled=1” for the “[crb]” section

The python3-ipython is from EPEL.

The python3-pygments is in ‘crb’. The ‘crb’ is disabled by default.

If you want to enable repo ad hoc, then you run ‘dnf’ with --enablerepo=crb option.

If you want the repo (crb) to always be enabled, then the convenient way to “edit that file” is:

dnf config-manager --enable crb

Yes, EPEL packages rely on CRB (code-ready-builder). I’m not sure how you installed EPEL, but assuming you installed it like my example below, there was a little communication message about CRB that you may have missed:

[root@rocky9 ~]# dnf install epel-release

 epel-release                   noarch                   9-4.el9                     extras                    19 k

Running transaction
  Preparing        :                                                                                            1/1 
  Installing       : epel-release-9-4.el9.noarch                                                                1/1 
  Running scriptlet: epel-release-9-4.el9.noarch                                                                1/1 

Many EPEL packages require the CodeReady Builder (CRB) repository.
It is recommended that you run /usr/bin/crb enable to enable the CRB repository.

  Verifying        : epel-release-9-4.el9.noarch                                                                1/1 



then you could have just enabled CRB as per the message output and all would have been good.