Skip to content
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

instructions for installing jupyter notebook extensions fail with error message: Unrecognized flag: '--py' #441

Closed
mikeroberts3000 opened this issue Sep 24, 2016 · 5 comments

Comments

@mikeroberts3000
Copy link

Hello,

The instructions for installing the jupyter notebook extensions for Mayavi (listed at http://docs.enthought.com/mayavi/mayavi/tips.html) are to type the following shell command:

$ jupyter nbextension install --py mayavi --user

Doing so yields the following error on my system:

[InstallNBExtensionApp] CRITICAL | Bad config encountered during initialization:
[InstallNBExtensionApp] CRITICAL | Unrecognized flag: '--py'

I have jupyter 4.1.0 installed (verified by typing jupyter --version on the command line) and Mayavi 4.2.0 installed (verified by running import mayavi; print mayavi.__version__; from within a python session).

@mikeroberts3000 mikeroberts3000 changed the title instructions for installing jupyter notebook extensions fail with error message "Unrecognized flag: '--py'" instructions for installing jupyter notebook extensions fail with error message: Unrecognized flag: '--py' Sep 24, 2016
@kitchoi
Copy link
Contributor

kitchoi commented Sep 26, 2016

Hi Mike,
I am sorry that the jupyter notebook functionality is new in Mayavi version 4.5.0
I think the documentation tips page would benefit from a note on which version the feature is available.
Thanks for your report. Closing.

@kitchoi kitchoi closed this as completed Sep 26, 2016
@mikeroberts3000
Copy link
Author

Ah, makes sense. Thanks for the reply. I'll keep an eye out for when version 4.5 makes it into the Canopy package manager, which currently only has version 4.4.3.

@kitchoi Silly question, are Mayavi animations (e.g., created with the @mayavi.mlab.animate function decorator) supported in Jupyter notebooks?

@prabhuramachandran
Copy link
Member

@mikeroberts3000 -- actually, if you do not run jupyter nbextension install --py mayavi --user you should still be able to use the new feature. You won't be able to see the plots without an internet connection though. The installation just installs the JS files, so to get this working all you need to do is:

mlab.init_notebook(local=False)

and it should work and pull the JS files from the internet.

@prabhuramachandran
Copy link
Member

@mikeroberts3000 -- to answer your question on the animate decorator, yes it should work on the notebook. However, it will produce meaningful output only if screenshots are properly generated in offscreen mode -- unfortunately this is often tricky and platform/build dependent.

@prabhuramachandran
Copy link
Member

@mikeroberts3000 -- I am terribly sorry, I got all confused with the jupyter version and the mayavi version. Indeed you need mayavi-4.5.0 for the new init_notebook function! I will document this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants