jupyter-widgets / widget-ts-cookiecutter

A highly opinionated cookiecutter template for ipywidget extensions.
BSD 3-Clause "New" or "Revised" License
121 stars 55 forks source link

I can't get the basic project to work in editable mode #129

Open remborg opened 1 year ago

remborg commented 1 year ago

Hi, I'm trying to get a project generated with the cookiecutter to work in editable mode, so I can develop custom widgets, but I keep having this error showing up:

...
Successfully built test_custom_widgets
Installing collected packages: test_custom_widgets
  Attempting uninstall: test_custom_widgets
    Found existing installation: test_custom_widgets 0.1.0.dev0
    Uninstalling test_custom_widgets-0.1.0.dev0:
      Successfully uninstalled test_custom_widgets-0.1.0.dev0
  Rolling back uninstall of test_custom_widgets
  Moving to /opt/conda/etc/jupyter/nbconfig/notebook.d/test_custom_widgets.json
  from /tmp/pip-uninstall-qh0w08u9/test_custom_widgets.json
  Moving to /opt/conda/lib/python3.9/site-packages/test_custom_widgets-0.1.0.dev0.dist-info/
  from /opt/conda/lib/python3.9/site-packages/~est_custom_widgets-0.1.0.dev0.dist-info
  Moving to /opt/conda/lib/python3.9/site-packages/test_custom_widgets.pth
  from /tmp/pip-uninstall-iqukd30m/test_custom_widgets.pth
  Moving to /opt/conda/share/jupyter/nbextensions/test_custom_widgets/
  from /opt/conda/share/jupyter/nbextensions/~est_custom_widgets
  Moving to /opt/extensions/test_custom_widgets/test_custom_widgets/labextension/
  from /opt/extensions/test_custom_widgets/test_custom_widgets/~abextension
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/opt/conda/share/jupyter/labextensions/test_custom_widgets/package.json'

The command I'm running is pip install -e ".[test, examples]".

The project is not modified and exactly as created with the cookiecutter. No package added, no file modified. Also for some reason it works sometimes but if I clean the project from generated files (jlpm run clean) then it stops working again.


This is running in a docker container with Python 3.9.10 and node v17.9.0 on a Linux RHEL 7.7 (using WSL2).

Here is a list of the pip packages

Package                       Version   
----------------------------- ---------- 
alembic                       1.7.7
anyio                         3.5.0
argon2-cffi                   21.3.0
argon2-cffi-bindings          21.2.0
asttokens                     2.0.5
async-generator               1.10
attrs                         21.4.0
Babel                         2.9.1
backcall                      0.2.0
backports.functools-lru-cache 1.6.4
beautifulsoup4                4.11.1
bleach                        5.0.0
blinker                       1.4
brotlipy                      0.7.0
certifi                       2022.9.24
certipy                       0.1.3
cffi                          1.15.0
charset-normalizer            2.0.12
colorama                      0.4.4
conda                         4.12.0
conda-package-handling        1.8.1
coverage                      7.2.2
cryptography                  38.0.3
debugpy                       1.6.0
decorator                     5.1.1
defusedxml                    0.7.1
entrypoints                   0.4
exceptiongroup                1.1.1
executing                     0.8.3
fastjsonschema                2.15.3
flit_core                     3.7.1
greenlet                      1.1.2
idna                          3.3
importlib-metadata            4.11.3
importlib-resources           5.7.1
iniconfig                     2.0.0
ipykernel                     6.13.0
ipython                       8.2.0
ipython-genutils              0.2.0
ipywidgets                    8.0.4
jedi                          0.18.1
Jinja2                        3.1.1
json5                         0.9.5
jsonschema                    4.4.0
jupyter-client                7.3.0
jupyter-core                  4.9.2
jupyter-server                1.17.0
jupyter-telemetry             0.1.0
jupyterhub                    1.5.0
jupyterlab                    3.2.8
jupyterlab-pygments           0.2.2
jupyterlab-server             2.13.0
jupyterlab-widgets            3.0.5
libmambapy                    1.0.0
Mako                          1.2.0
mamba                         1.0.0
MarkupSafe                    2.1.1
matplotlib-inline             0.1.3
mistune                       0.8.4
nb-conda-kernels              2.3.1
nbclassic                     0.3.7
nbclient                      0.6.0
nbconvert                     6.5.0
nbformat                      5.3.0
nbval                         0.10.0
nest-asyncio                  1.5.5
notebook                      6.4.8
notebook-shim                 0.1.0
oauthlib                      3.2.0
packaging                     21.3
pamela                        1.0.0
pandocfilters                 1.5.0
parso                         0.8.3
pexpect                       4.8.0
pickleshare                   0.7.5
pip                           22.0.4
pluggy                        1.0.0
prometheus-client             0.14.1
prompt-toolkit                3.0.29
psutil                        5.9.0
ptyprocess                    0.7.0
pure-eval                     0.2.2
pycosat                       0.6.3
pycparser                     2.21
pycurl                        7.45.1
Pygments                      2.12.0
PyJWT                         2.3.0
pyOpenSSL                     22.0.0
pyparsing                     3.0.8
pyrsistent                    0.18.1
PySocks                       1.7.1
pytest                        7.2.2
pytest-cov                    4.0.0
python-dateutil               2.8.2
python-json-logger            2.0.1
pytz                          2022.1
pyzmq                         22.3.0
requests                      2.27.1
ruamel.yaml                   0.17.21
ruamel.yaml.clib              0.2.6
ruamel-yaml-conda             0.15.80
Send2Trash                    1.8.0
setuptools                    62.1.0
six                           1.16.0
sniffio                       1.2.0
soupsieve                     2.3.1
SQLAlchemy                    1.4.36
stack-data                    0.2.0
terminado                     0.13.3
test_custom_widgets           0.1.0.dev0 /opt/extensions/test_custom_widgets
tinycss2                      1.1.1
tomli                         2.0.1
tornado                       6.1
tqdm                          4.64.0
traitlets                     5.1.1
urllib3                       1.26.9
wcwidth                       0.2.5
webencodings                  0.5.1
websocket-client              1.3.2
wheel                         0.37.1
widgetsnbextension            4.0.5
zipp                          3.8.0