Code Monkey home page Code Monkey logo

Comments (14)

mwcraig avatar mwcraig commented on June 15, 2024 1

That is never incorrect, though in some cases it is unnecessary. In notebook v5.3 (or maybe 5.4) they introduced a directory-based scheme for installing notebook extensions that made it possible to install them via setup.py. ipyevents is set up to do that now so it shouldn't (in the future) require any extra steps.

The situation in jupyterlab is a little better because they decided to make all extensions npm packages and to use node/npm to handle the extension installation (instead of iterating through a couple years of custom installation approaches like with notebooks).

from ipyevents.

pllim avatar pllim commented on June 15, 2024

Actually, this might be more serious than what I posted above. I think all keyboard key bindings for Ginga viewer are gone. I cannot use numeric keys to change zoom either.

from ipyevents.

ejeschke avatar ejeschke commented on June 15, 2024

Can you open the browser javascript console to see if there are any errors showing up there when you type into the widget?

from ipyevents.

pllim avatar pllim commented on June 15, 2024

I couldn't figure out how to save the log into plain text, so here is a screenshot.

console_errors

from ipyevents.

pllim avatar pllim commented on June 15, 2024

Actually, when I pip install ipyevents==0.4.0 into my conda environment, I get this same problem too! But it works when I do a conda install ipyevents. 😕

from ipyevents.

mwcraig avatar mwcraig commented on June 15, 2024

from ipyevents.

pllim avatar pllim commented on June 15, 2024
$ jupyter nbextension list
      - Validating: ok
      - Validating: ok
Known nbextensions:
  config dir: C:\...\Miniconda3\envs\py37\etc\jupyter\nbconfig
    notebook section
      ipyevents/extension enabled
      jupyter-js-widgets/extension enabled

Then I conda uninstall ipyevents followed by pip install ipyevents to pick up 0.4.1 (again). But jupyter nbextension install --sys-prefix ipyevents fails.

Traceback (most recent call last):
  File "C:\...\Miniconda3\envs\py37\Scripts\jupyter-nbextension-script.py", line 11, in <module>
    load_entry_point('notebook==5.7.4', 'console_scripts', 'jupyter-nbextension')()
  File "C:\...\Miniconda3\envs\py37\lib\site-packages\jupyter_core\application.py", line 266, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "C:\...\Miniconda3\envs\py37\lib\site-packages\traitlets\config\application.py", line 658, in launch_instance
    app.start()
  File "C:\...\Miniconda3\envs\py37\lib\site-packages\notebook\nbextensions.py", line 988, in start
    super(NBExtensionApp, self).start()
  File "C:\...\Miniconda3\envs\py37\lib\site-packages\jupyter_core\application.py", line 255, in start
    self.subapp.start()
  File "C:\...\Miniconda3\envs\py37\lib\site-packages\notebook\nbextensions.py", line 716, in start
    self.install_extensions()
  File "C:\...\Miniconda3\envs\py37\lib\site-packages\notebook\nbextensions.py", line 695, in install_extensions
    **kwargs
  File "C:\...\Miniconda3\envs\py37\lib\site-packages\notebook\nbextensions.py", line 199, in install_nbextension
    _maybe_copy(src, full_dest, logger=logger)
  File "C:\...\Miniconda3\envs\py37\lib\site-packages\notebook\nbextensions.py", line 1043, in _maybe_copy
    if _should_copy(src, dest, logger=logger):
  File "C:\...\Miniconda3\envs\py37\lib\site-packages\notebook\nbextensions.py", line 1019, in _should_copy
    if os.stat(src).st_mtime - os.stat(dest).st_mtime > 1e-6:
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'ipyevents'

from ipyevents.

mwcraig avatar mwcraig commented on June 15, 2024

My bad, I left out a an option:

jupyter nbextension install --py --sys-prefix ipyevents

I don't think that will fix it though, since the ipyevents extension is already listed as installed and enabled.

from ipyevents.

mwcraig avatar mwcraig commented on June 15, 2024

Does the demo notebook for ipyevents work for you?

from ipyevents.

pllim avatar pllim commented on June 15, 2024

I think jupyter nbextension install --py --sys-prefix ipyevents fixed it. For lab, I also ran jupyter labextension install ipyevents. Now it works. Magic. Thanks!

from ipyevents.

ejeschke avatar ejeschke commented on June 15, 2024

Seems like I've seen two or three different incantations for the jupyter nbextension install command now (over the years), and it is a little difficult to remember which one is correct. @pllim, maybe we should double check that we have an up-to-date note somewhere in the ginga install docs that if you want to use the jupyterw version this is what you have to do.

from ipyevents.

pllim avatar pllim commented on June 15, 2024

The instructions in ginga/examples/jupyter-notebook/Jupyter Widget Ideas.ipynb said:

$ pip install ipyevents
$ jupyter nbextension enable --py --sys-prefix ipyevents

Is that still correct, @mwcraig ?

from ipyevents.

pllim avatar pllim commented on June 15, 2024

OK, I'll just leave it be for now then. Thanks for the clarifications!

from ipyevents.

ejeschke avatar ejeschke commented on June 15, 2024

Thanks, @mwcraig !

from ipyevents.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.