pytorch + cuda +pyg 安装

1.  conda 虚拟环境安装

查看所有虚拟环境  conda env list
删除指定虚拟环境 conda env remove -name yor_env_nam

2. 安装pytorch + cuda

 

pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113
pytorch网站:https://pytorch.org/get-started/locally

 

3.安装pyg

进这个网站 分别安装指定版本的包

https://data.pyg.org/whl/torch-1.12.0%2Bcu113.html

pip install torch-geometric

 

4 .内核

添加内核
  conda install nb_conda_kernels # 安装nb_conda_kernels   conda install ipykernel # 安装ipykernel   # 将环境写入jupyter notebook的kernel中   python
-m ipykernel install --user --name env_name --display-name "你想为kernel添加的名称"

删除内核 jupyter kernelspec remove env_name # 如果给env_name起了别名,将env_name替换成别名

 


 

posted @ 2022-09-25 00:20  写代码的小哥哥  阅读(187)  评论(0)    收藏  举报