Page MenuHomeSolus

python-jupyter_client missing a dependency
Closed, ResolvedPublic


After installing python-jupyter_client, there is an error when trying to run jupyter kernelspec:

polomi@solus ~ $ jupyter kernelspec
Traceback (most recent call last):
  File "/usr/bin/jupyter-kernelspec", line 6, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

This is solved by installing python-setuptools. So should it possibly be added as a rundep?

Also jupyter-kernelspec is provided by jupter_client, not jupyter_core (see the documentation), so that's where I suggest to add the dependency.

Event Timeline

rjurga created this task.Feb 3 2018, 12:02 PM
rjurga updated the task description. (Show Details)
rjurga updated the task description. (Show Details)
rjurga updated the task description. (Show Details)
rjurga updated the task description. (Show Details)Feb 3 2018, 12:04 PM

Not sure on this one, don't think python-setuptools should be the rundep though. There's an optional dep on python-pytest which requires python-setuptools which was an issue per T5724 which has now been resolved, So anyone using pytest with it should have it setuptools installed.

Whether python-pytest should be a dep of this is a different question though

I agree that it is actually not obvious. I am asking upstream:

Just leaving this comment here. What I understand from the official site (, is that the option extra=='test' means if you want to run the tests on the module (my knowledge in python is minimal so I could be completely wrong). So, if I'm right, then python-pytest, python-mock, python-ipython and python-ipykernel could be added as builddeps in order to add tests to the package, but not as rundeps.

For sure, pytest and mock are required for testing only.

What I'm unsure about (and what I asked upstream, see previous comment) is whether the command jupyter kernelspec (which gives the error) is considered part of testing or normal usage. If it's considered as testing (which I don't think it is) then all is fine here on Solus and nothing should be changed. If it's not considered as testing exclusively, then the onus is on upstream to specify that python-setuptools should be a dependency and only then it should be added to Solus I guess?

rjurga added a comment.Feb 3 2018, 6:37 PM

The Jupyter developers answered here.

So python-setuptools is not a dependency upstream and pkg_resources should not be needed when jupyter_client is built with pip. For some reason the way it is packaged in Solus makes it needed here and according to them it makes it a downstream - Solus - issue. They have some suggested solutions too.

DataDrake triaged this task as Low priority.Oct 16 2018, 6:59 PM
DataDrake moved this task from Backlog to Package Fixes on the Software board.

This bug has been fixed.

Girtablulu closed this task as Resolved.Jul 3 2019, 2:23 PM
Girtablulu claimed this task.