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

Trouble activating extension #9

Open
mgsosna opened this issue Nov 5, 2017 · 6 comments
Open

Trouble activating extension #9

mgsosna opened this issue Nov 5, 2017 · 6 comments
Assignees

Comments

@mgsosna
Copy link

mgsosna commented Nov 5, 2017

Hi, thanks for writing this script. I've downloaded the .js file and enabled it, but nothing has changed in Jupyter. (I'm using the jupyter_nbextensions_configurator.)

jupyter

There are two theme selectors (theme_selector.js and jupyter_themes/theme_selector.js) and both say that there is no YAML file that tells Jupyter how to configure it. I've closed and reopened Jupyter multiple times, and tried just theme_selector.js, just jupyter_themes/theme_selector.js, etc. and no change. Any advice would be really appreciated. I'm using Windows 10, if that matters.

Thanks!

@merqurio
Copy link
Owner

merqurio commented Nov 6, 2017

I'll check it ASAP, thanks for the report !

@merqurio
Copy link
Owner

merqurio commented Nov 10, 2017

@mmgrobis I installed the nbextensions_configurator, but just got one installation. Did you checked that you didn't installed it twice ?

Anyway I'll update the script to be more nbextensions_configurator friendly

@mgsosna
Copy link
Author

mgsosna commented Nov 11, 2017

Thanks, @merqurio. I tried a few things and managed to get the extension downloaded. I had created the nbextension/jupyter-themes folder in the .jupyter directory on C:/Users/[me] but somehow that wasn't doing anything. So I ran jupyter --paths and found the other locations on my computer that Jupyter references... so I just went to those directories and created the nbextension/jupyter-themes folders with the theme_selector.js file.

So now Jupyter has the additional options under the "Cell" header. However, like another user mentioned, no syntax highlighting occurs unless you have "Default" selected. I don't get any error messages, just no syntax highlighting. I'm using Firefox.

Thanks for your help!

@merqurio
Copy link
Owner

Let me know if this was solved with the latest commit, if not I have some time this week to help you to solve this :)

@mgsosna
Copy link
Author

mgsosna commented Jun 1, 2018

Hi merqurio, thanks again for your work on this package and for answering my earlier questions. I just wanted to re-open the discussion a bit. I've tried installing this plugin a few times on different computers but never have had any success.

My workflow:

  1. Download pip, install Python through pip.
  2. Download conda to install Spyder, Jupyter Notebooks, etc.
  3. Enable Jupyter nbextensions
    pip install jupyter_contrib_nbextensions
    jupyter contrib nbextension install --user

These extensions are located at C:\Users\mmgrobis\Anaconda3\Lib\site-packages\jupyter_contrib_nbextensions\nbextensions

  1. Create a new folder called jupyter_themes
  2. Download jupyter_themes repo as a zip file. Extract all files, then copy and paste theme_selector.js into nbextensions/jupyter_themes

At this point, jupyter_themes and theme_selector aren't visible in the Jupyter nbextension environment (the "Nbextensions" tab at the top when you first open Jupyter Notebooks). All the other folders in the nbextensions folder are visible. So I tried to enable the extension from the command line, as in your README:

  1. cd C:\Users\mmgrobis\Anaconda3\Lib\site-packages\jupyter_contrib_nbextensions
  2. jupyter nbextension enable jupyter_themes/theme_selector

I get this error message:
Enabling notebook extension jupyter_themes/theme_selector...
- Validating: problems found:
- require? X jupyter_themes/theme_selector

When I go to Jupyter Nbextensions (open Jupyter Notebooks, go to 'Nbextensions' tab on top), I now see jupyter_themes/theme_selector, but it's labeled as incompatible. When I click on it, I see this message:
This nbextension is enabled in the notebook json config, but doesn't provide a yaml file to tell us how to configure it. You can still enable or disable it from here, though.

When I enable it, I don't see any change in the notebook. (No new items under the "Cell" tab.)

Thoughts:

  • I wonder if there might be an issue with having both pip and conda installed
  • Would it be possible for you to provide more description in your README about what directory you're in when you download theme_selector.js? Could you maybe have a version of instructions for people who aren't very familiar with bash or command line in general?

Thanks again for your help. Any help would be appreciated. I've long wanted to change the syntax highlighting in Jupyter and am surprised it's not yet available for Notebooks or for Lab.

Best,
Matt

@saaleh2
Copy link

saaleh2 commented Nov 20, 2021

@mgsosna surprisingly it's 2021 and still not available until now!
I'm facing the same problem, did you find a way to solve this?

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

No branches or pull requests

3 participants