やりたいこと
JupyterLabのLauncher画面に表示されるアイコンを消したい.
削除した仮想環境も表示されてしまうので表示されないようにします.
![jupyterlab.png](https://qiita-user-contents.imgix.net/https%3A%2F%2Fqiita-image-store.s3.ap-northeast-1.amazonaws.com%2F0%2F526723%2Fd18c8a88-fc39-0e2c-7340-61aeaf1dc39e.png?ixlib=rb-4.0.0&auto=format&gif-q=60&q=75&s=c43aa2d2eee95b6787285e91056dc77b)
方法1
次のコマンド を打ち込んでカーネル(仮想環境)の名前一覧を確認します。
jupyter kernelspec list
次のコマンドを打ち込めばカーネルの表示を削除できます.仮想環境名には上で確認したカーネルの名前を打ち込みます.
jupyter kernelspec uninstall 仮想環境名
参考
- Using jupyter notebooks with a virtual environment
https://anbasile.github.io/posts/2017-06-25-jupyter-venv/ - Using Virtual Environments in Jupyter Notebook and Python
https://janakiev.com/blog/jupyter-virtual-envs/
方法2
C:\Users\{ユーザ名}\AppData\Roaming\jupyter\kernels
を開きます.
削除したい仮想環境に対応するフォルダを削除します.
そうするとJupyterLabのLauncher画面からアイコンも消えます.
フォルダの名前を見れば対応するフォルダ名は分かります.
追記
ホワイトリストを作成する方法もあるようです
Remove environments from the Jupyter Lab Launcher
https://discourse.jupyter.org/t/remove-environments-from-the-jupyter-lab-launcher/762/4