conda create -n env_name python=x.x
conda -V #查看conda版本
conda info -e #查看conda虚拟环境
conda activate en_name #进入conda虚拟环境
conda list #查看安装了哪些包
conda install pkg_name #安装包
conda uninstall pkg_name #删除包
pip install pkg_name #安装包
pip uninstall pkg_name #删除包
conda deactivate #退出虚拟环境
conda remove -n env_name --all #删除虚拟环境
conda update conda #检查更新conda
nvidia-smi
conda install pytorch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 cudatoolkit=11.3 -c pytorch
(安装较慢,可添加镜像)
进入官网:https://pytorch-geometric.com/whl/index.html
选择上面安装的pytorch版本和cuda版本,依次安装四个依赖包(复制链接安装,和python版本和操作系统对应)
安装pytorch-geometric
pip install https://data.pyg.org/whl/torch-1.11.0%2Bcu115/torch_cluster-1.6.0-cp39-cp39-win_amd64.whl
pip install https://data.pyg.org/whl/torch-1.11.0%2Bcu115/torch_scatter-2.0.9-cp39-cp39-win_amd64.whl
pip install https://data.pyg.org/whl/torch-1.11.0%2Bcu115/torch_sparse-0.6.14-cp39-cp39-win_amd64.whl
pip install https://data.pyg.org/whl/torch-1.11.0%2Bcu115/torch_spline_conv-1.2.1-cp39-cp39-win_amd64.whl
pip install pytorch-geometric
python
import torch
torch.cuda.is_available()
都没有出错,则安装成功
conda install keras==x.x.x
pip install scikit-learn