很多时候第三方库之间存在冲突,这时候就需要配置新conda环境,步骤如下:
conda create -n py_env python=3.6
conda install numpy
conda install matplotlib
conda install pytorch
conda install Pillow
conda install scikit-learn
conda install graphviz
# 激活环境
conda activate py_env
# 配置jupyter
conda install jupyter notebook
conda install ipykernel
# 将环境内核写入jupyter notebook
python -m ipykernel install --user --name py_env --display-name "Python36"