-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nbconvert installed from conda or pip fails because missing jupyter_client #556
Comments
I'd been in favour of it before, I still am. I forget exactly what the argument is for why execute should be thought to be an edge case feature. I think there might be a reason beyond that. Along the lines of: "if you want to do this, you can probably figure out how to do it (if you are capable enough to be trusted to do this safely)." And I'm not sure I agree with that but execute is one of the more dangerous features that we ship so if we're ever going to take that attitude, it would seem that “getting the execute preprocesser to function” would be an ideal case. So I'm conflicted but likely to be easily swayed in either direction based of further discussion. I imagine the topic will be about our role in enabling people with great power. But with great power comes the responsibility to not accidentally “shoot yourself in the foot”. The danger presented by the execute preprocessor is that it makes it easy to execute arbitrary code from someone else. Someone more novice might trust a file that in reality is untrustworthy |
Oops hit close and comment by mistake. |
Possibly the reason it's an 'extra' dependency is that it introduces a dependency on pyzmq, which may be harder to install in some situations, as it has compiled pieces. Now that we have wheels, however, it mostly doesn't make a big difference. |
The big problem I see here is that I see the error even when I do not want to use the execute feature! |
Yep, that's definitely a bug. If |
There probably isn't a good enough reason to exclude jupyter_client in the conda package, since we know it will always be easily installable in that context. There are still plenty of pip installations where pulling in things like zmq would be nice to avoid, though. Even if it is made a strict dependency, the delayed import is still the right thing to do for startup time reasons. |
Yep, I will ping the anaconda people so it gets added into the default channel recipe as well Thank you all for the discussion! |
Just to let you know, this was added in the package coming from default as well. |
Either if I install it using
conda
orpip
I see this error:My best guess... we are adding the execute preprocessor in the preprocessor default list and when it is being registered, it fails: https://github.com/jupyter/nbconvert/blob/5.1.1/nbconvert/exporters/exporter.py#L72
I think this was missed because if you are developer, you installed all the dependencies... and if you are an user, you probably installed it in the same environment with the notebook, so you are covered.
Or I have something wrong in my environments and I have to start from scratch 😉
Proposal... if we decide to ship the execute preprocessor as a default one (which I believe is true) then let's just add the jupyter_client as a dependency.
Let me know if you agree and I will push a PR adding the dependency.
ping @mpacer @takluyver @Carreau @minrk which has been involved in previous discussion around
jupyter_client
here...The text was updated successfully, but these errors were encountered: