一、错误产生原因
在已激活的环境中安装ipykernel包,运行以下命令:
pip install ipykernel
将该环境添加到Jupyter Notebook中,运行以下命令:
ipython kernel install --user --name chatglm
或类似命令:
python -m ipykernel install --user --name=myenv --display-name="Python (myenv)"
这个命令会在Jupyter Notebook中创建一个新的内核,它的名字是myenv,显示名称是Python (myenv)。这个新的内核会使用你特定的conda环境中的Python版本。
二、错误提示
运行,输入 jupyter notebook,产生如下错误:
$ jupyter notebook
Traceback (most recent call last):
File "C:\Users\win10\anaconda3\Lib\site-packages\notebook\traittypes.py", line 235, in _resolve_classes
klass = self._resolve_string(klass)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\win10\anaconda3\Lib\site-packages\traitlets\traitlets.py", line 2015, in _resolve_string
return import_item(string)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\win10\anaconda3\Lib\site-packages\

最低0.47元/天 解锁文章
1万+





