TLDR:
pip install jupyterlab_execute_time # or, if using conda:
# conda install -c conda-forge jupyterlab_execute_time
Explanation:
It appears that you are trying to use the old way of installing extensions (jupyter labextension install @org/extension-name
, which is also the way the Extension Manager installs extensions), which used NPM servers to download code and required users to have a Node.js installed (to compile the code).
However, since JupyterLab 3.0 extensions may no longer require Node.js to be installed; they use a new prebuilt extensions mechanism (also known as federated extensions), which means that they no longer require compilation. The requirement to use NPM for distribution no longer applies either. Instead, it is now common for authors to distribute extensions via other channels such as PyPI or conda-forge (because if someone has JupyterLab installed, they most likely used one of these two distribution channels).
Extension authors targeting the JupyterLab 3.0+ can choose to either:
- continue publishing on NPM and ignore the new federated extensions mechanism, or
- adapt federated extensions and start publishing to PyPI/conda-forge only, or
- publish to both NPM and PyPI/conda-forge
In case of jupyterlab-execute-time
the author went the (2) route, only publishing to PyPI/conda-forge, with the latest published release as for the day of writing being 2.0.2 on PyPI; the NPM package however was not removed and it remained on the old version 1.1.0 on NPM (which is good for users who still have to use the old JupterLab 2.x line). You may wish to contact the author on GitHub and ask them to publish a new version on NPM, which they may refuse given that it comes with extra maintenance cost and not that much benefit (the benefit is mostly for users who use the built-in Extension Manager because it still has not been updated to work with PyPI/conda-forge installation, but this is a feature is on the roadmap - please do contribute if you can).
To easily check what is the situation for other extensions please carefully read the installation instruction on both the GitHub, PyPI, and the NPM page if one exists; in the case of jupyterlab_execute_time
you can clearly see that the NPM version was not updated for JupyterLab 3.0 (see the blue highlight):
Whereas the version on PyPI (and GitHub) was (see yellow highlight):
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…