Skip to content

Developer installation #422

Open
Open

Description

@notEvil

Hi,

I had an issue with an animation that I wanted to debug, but whatever I tried, I failed to setup the dev environment. What I did:

What I found out so far:

  • jupyter nbextension install ... fails due to missing ipython_genutils and maybe more
  • after installing jupyterlab, jupyter nbextension install ... creates a symlink to itself because ./share/jupyter/nbextensions doesn't exist, see ipython._prefix
    • but ./share/jupyter/labextensions exists
  • after installing jupyterlab, jupyter labextension ... fails due to missing jupyter_packaging
  • eventually, with the obvious fixes to those issues, the commands didn't fail, but jupyter lab now says [W ... LabApp] ipyvolume is not a valid extension

Those issues could be related to my setup, so it would be great to know what the actual requirements for this project are (like npm version ...) and if anyone is able to create a developer installation in a clean Python environment.

Activity

  1. maartenbreddels commented on Jan 18, 2023

    @maartenbreddels
    Collaborator

    Hi,

    • jupyter nbextension install ... fails due to missing ipython_genutils and maybe more

    That is odd to start with, can you share the full error msg and maybe library versions of notebook, ipython and ipython_genutils?

    Regards,

    Maarten

  2. notEvil commented on Jan 18, 2023

    @notEvil
    Author

    In a clean master, when I run pipenv run pip install -e . it says

    Details
    ...
    Successfully installed
    Pillow-9.4.0
    asttokens-2.2.1
    backcall-0.2.0
    bqplot-0.12.36
    certifi-2022.12.7
    charset-normalizer-3.0.1
    comm-0.1.2
    contourpy-1.0.7
    cycler-0.11.0
    debugpy-1.6.5
    decorator-5.1.1
    entrypoints-0.4
    executing-1.2.0
    fonttools-4.38.0
    idna-3.4
    ipydatawidgets-4.3.2
    ipykernel-6.20.2
    ipython-8.8.0
    ipyvolume-0.6.0a10
    ipyvue-1.8.0
    ipyvuetify-1.8.4
    ipywebrtc-0.6.0
    ipywidgets-8.0.4
    jedi-0.18.2
    jupyter-client-7.4.9
    jupyter-core-5.1.3
    jupyterlab-widgets-3.0.5
    kiwisolver-1.4.4
    matplotlib-3.6.3
    matplotlib-inline-0.1.6
    nest-asyncio-1.5.6
    numpy-1.24.1
    packaging-23.0
    pandas-1.5.2
    parso-0.8.3
    pexpect-4.8.0
    pickleshare-0.7.5
    platformdirs-2.6.2
    prompt-toolkit-3.0.36
    psutil-5.9.4
    ptyprocess-0.7.0
    pure-eval-0.2.2
    pygments-2.14.0
    pyparsing-3.0.9
    python-dateutil-2.8.2
    pythreejs-2.4.1
    pytz-2022.7.1
    pyzmq-25.0.0
    requests-2.28.2
    six-1.16.0
    stack-data-0.6.2
    tornado-6.2
    traitlets-5.8.1
    traittypes-0.2.1
    urllib3-1.26.14
    wcwidth-0.2.6
    widgetsnbextension-4.0.5
    

    Then pipenv run python -m jupyter nbextension install --py --overwrite --symlink --sys-prefix ipyvolume fails because there is no jupyter-nbextension in the search path, except the system one. This one spawns the system interpreter which can't find ipyvolume for apparent reason. So I run pipenv run pip install jupyterlab and get

    Details
    ...
    Successfully installed
    MarkupSafe-2.1.2
    anyio-3.6.2
    argon2-cffi-21.3.0
    argon2-cffi-bindings-21.2.0
    arrow-1.2.3
    attrs-22.2.0
    babel-2.11.0
    beautifulsoup4-4.11.1
    bleach-5.0.1
    cffi-1.15.1
    defusedxml-0.7.1
    fastjsonschema-2.16.2
    fqdn-1.5.1
    ipython-genutils-0.2.0
    isoduration-20.11.0
    jinja2-3.1.2
    json5-0.9.11
    jsonpointer-2.3
    jsonschema-4.17.3
    jupyter-events-0.6.3
    jupyter-server-2.1.0
    jupyter-server-terminals-0.4.4
    jupyterlab-3.5.2
    jupyterlab-pygments-0.2.2
    jupyterlab-server-2.19.0
    mistune-2.0.4
    nbclassic-0.4.8
    nbclient-0.7.2
    nbconvert-7.2.8
    nbformat-5.7.3
    notebook-6.5.2
    notebook-shim-0.2.2
    pandocfilters-1.5.0
    prometheus-client-0.15.0
    pycparser-2.21
    pyrsistent-0.19.3
    python-json-logger-2.0.4
    pyyaml-6.0
    rfc3339-validator-0.1.4
    rfc3986-validator-0.1.1
    send2trash-1.8.0
    sniffio-1.3.0
    soupsieve-2.3.2.post1
    terminado-0.17.1
    tinycss2-1.2.1
    tomli-2.0.1
    uri-template-1.2.0
    webcolors-1.12
    webencodings-0.5.1
    websocket-client-1.4.2
    

    Now the same command gives me

    Details
    Installing /home/user/.local/share/virtualenvs/ipyvolume-NKv-9FhU/share/jupyter/nbextensions/ipyvolume/ -> ipyvolume
    Symlinking: /home/user/.local/share/virtualenvs/ipyvolume-NKv-9FhU/share/jupyter/nbextensions/ipyvolume -> /home/user/.local/share/virtualenvs/ipyvolume-NKv-9FhU/share/jupyter/nbextensions/ipyvolume
    - Validating: problems found:
       X  require: /home/user/.local/share/virtualenvs/ipyvolume-NKv-9FhU/share/jupyter/nbextensions/ipyvolume/extension.js
      OK section: notebook
    Full spec: {'section': 'notebook', 'src': '/home/user/.local/share/virtualenvs/ipyvolume-NKv-9FhU/share/jupyter/nbextensions/ipyvolume/', 'dest': 'ipyvolume', 'require': 'ipyvolume/extension'}
    
        To initialize this nbextension in the browser every time the notebook (or other app) loads:
        
              jupyter nbextension enable ipyvolume --py --sys-prefix
    

    This is the symlink to itself due to non-existent nbextensions. Output of find share:

    share
    share/jupyter
    share/jupyter/labextensions
    share/jupyter/labextensions/ipyvolume
    share/jupyter/labextensions/ipyvolume/static
    share/jupyter/labextensions/ipyvolume/static/style.js
    share/jupyter/labextensions/ipyvolume/package.json
    

    edit: couldn't reproduce the point you asked about, but the others are still valid. The jupyter situtation is unfortunate but easy to avoid.

  3. maartenbreddels commented on Jan 27, 2023

    @maartenbreddels
    Collaborator

    I reproduced this partially using a venv, I've update the README: d4c541f
    Does that help?
    Maybe your JS build does not get triggered.

  4. notEvil commented on Jan 28, 2023

    @notEvil
    Author

    Yes it does. The last command still requires jupyter_packaging, but its a minor nuisance. Thanks a lot!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions