jupyter-widgets / widget-cookiecutter

A cookiecutter template for creating a custom Jupyter widget project.
BSD 3-Clause "New" or "Revised" License
258 stars 72 forks source link

README install instructions for Jupyter lab are unclear #88

Closed willeppy closed 3 years ago

willeppy commented 3 years ago

Hi,

Description

I installed this cookie cutter onto my local machine and was following the README to set up for Jupyter lab, however ran into some issues.

When I run bashpip install -e . it executes successfully and installs. However, when I run jupyter labextension develop BasicWidget I get the following error.

Installing /Users/wepperso/Documents/Research/Projects/Notebook_Vis_Rec_Projects/BasicWidget/BasicWidget/labextension -> BasicWidget
An error occured.
ValueError: /Users/wepperso/opt/anaconda3/envs/jupTest/share/jupyter/labextensions/BasicWidget exists and is not a symlink
See the log file for details:  /var/folders/zg/pzhsf9sj45qcbpm46g7m_gf80000gp/T/jupyterlab-debug-i408sjj9.log

The widget still seems to work however. My question is what does the jupyter labextension develop command do? In order to get changes in the js/ folder to show up I have to re-run pip install -e . so I assume it might help with this.

Note: I did not run the install instructions for Jupyter notebook beforehand, only for lab. Is this necessary for the lab install to work?

OS

jasongrout commented 3 years ago

Don't forget the --overwrite mentioned in the readme. It's complaining that there is something already there (indeed, installed by the pip install command), which it will need to overwrite with the symlink.

jupyter labextension develop --overwrite BasicWidget
willeppy commented 3 years ago

Got it, this worked thanks! I didn't see the --overwrite mentioned in the README currently so opened a PR to update

89

jasongrout commented 3 years ago

I didn't see the --overwrite mentioned in the README currently so opened a PR to update

Ah, I was looking in the generated readme in the project, which does mention the --overwrite flag. Thanks for the update to the top-level readme!