matplotlib / matplotlib/ipympl

ipympl conda install deletes env's default labextensions state (but works with pip)

未关闭
#564 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Jupyter Notebook
星标
1.7k
派生
234
PR 合并指标
30 天内没有已合并 PR

描述

## Describe the issue
Installing ipympl with conda overwrites the content of `.../conda/envs/env_name/etc/jupyter/labconfig/page_config.json` resulting in enabling of all labextensions for all users (which is a big problem on a JupyterHub).

Install command:
```
conda install -c conda-forge ipympl
```
`.../conda/envs/env_name/etc/jupyter/labconfig/page_config.json` before ipympl install:
```
{
"disabledExtensions": {
"@jupyter/nbgrader:formgrader": true,
"@jupyter/nbgrader:course-list": true,
"@jupyter/nbgrader:create-assignment": true,
"kore-extension": true
},
"lockedExtensions": {
"@jupyter/nbgrader:formgrader": true,
"@jupyter/nbgrader:course-list": true,
"@jupyter/nbgrader:create-assignment": true,
"kore-extension": true
}
}
```
and after:
```
{
"lockedExtensions": {}
}
```

This is not caused by a dependency: installing all dependencies first shows that install of ipympl overwrites the file.

Using `pip install ipympl` everything works as expected (`page_config.json` remains untouched).

## Versions

* ipympl 0.9.4
* jupyterlab 4.2.4
* jupyterhub 5.1.0

```bash
# without output from jupyter nbextension list (not installed)

3.12.5 | packaged by conda-forge | (main, Aug 8 2024, 18:36:51) [GCC 12.4.0]
ipympl version: 0.9.4
Selected Jupyter core packages...
IPython : 8.26.0
ipykernel : 6.29.5
ipywidgets : 8.1.5
jupyter_client : 8.6.2
jupyter_core : 5.7.2
jupyter_server : 2.14.2
jupyterlab : 4.2.4
nbclient : 0.10.0
nbconvert : 7.16.4
nbformat : 5.10.4
notebook : 7.2.1
qtconsole : not installed
traitlets : 5.14.3
JupyterLab v4.2.4
/opt/conda/envs/jhub/share/jupyter/labextensions
jupyterlab-execute-time v3.1.2 enabled OK (python, jupyterlab_execute_time)
jupyterlab_pygments v0.3.0 enabled OK (python, jupyterlab_pygments)
jupyter-matplotlib v0.11.4 enabled OK
kore-extension v0.1.0 enabled OK (python, kore_extension)
@jupyter-notebook/lab-extension v7.2.1 enabled OK
@jupyter-widgets/jupyterlab-manager v5.0.13 enabled OK (python, jupyterlab_widgets)
@jupyter/nbgrader v0.9.3 enabled OK
```

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

使用 `conda install -c conda-forge ipympl` 重现该问题,并比较安装前后的 `.../conda/envs/env_name/etc/jupyter/labconfig/page_config.json`。将报告的 pip 行为作为对照;当现有的 `disabledExtensions` 和 `lockedExtensions` 设置在 conda 安装后仍保持不变时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
jupyter-notebook, python
领域
tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。