问题描述:
安装配置好Pytorch后,Jupyter Notebook新建文件还是只有Python
解决方法
1、以管理员身份打开Anaconda Prompt,在base环境中输入conda install nb_conda安装nb_conda。
如果报以下错误,说明Python版本不兼容nb_conda,可以选择重新创建虚拟环境,或者在base环境中运行conda install nb_conda_kernels
Specifications:
- nb_conda -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.8,<3.9.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0'] Your python: python=3.11 If python is on the left-most side of the chain, that's the version you've asked for. When python appears to the right, that indicates that the thing on the left is somehow not available for the python version you are constrained to. Note that conda will not change your python version to a different minor version unless you explicitly specify that.
2、conda activate xxx进入创建的环境,命令行输入conda install ipykernel安装ipykernel。
3、安装完成后进入Jupyter Notebook,创建文件时可以发现多了两个选项