搭建GNN环境教程
1、创建python=3.6的conda虚拟环境
conda create -n env_gnn python=3.6
2、用conda安装pytorch1.6.0的cpu版本
conda install pytorch==1.6.0 torchvision==0.7.0 -c pytorch
import torch
进行检验,没有问题。
3、pip安装cpu版本的PyG
pytorch-geometric(github项目)。
pytorch-geometric官方安装指南。
pip install torch-scatter==latest+cpu -f https://pytorch-geometric.com/whl/torch-1.6.0.html
pip install torch-sparse==latest+cpu -f https://pytorch-geometric.com/whl/torch-1.6.0.html
pip install torch-cluster==latest+cpu -f https://pytorch-geometric.com/whl/torch-1.6.0.html
pip install torch-spline-conv==latest+cpu -f https://pytorch-geometric.com/whl/torch-1.6.0.html
pip install torch-geometric
import torch_geometric
进行检验,没有问题。
4、conda安装cpu版本的DGL
conda install -c dglteam dgl
import dgl
进行检验,没有问题。
查看GNN环境
conda list
显示所有安装的库。
# Name Version Build Channel
appnope 0.1.0 py36_0
ase 3.20.1 pypi_0
blas 1.0 mkl
cached-property 1.5.2 pypi_0
certifi 2020.6.20 pypi_0
chardet 3.0.4 pypi_0
cycler 0.10.0 pypi_0
decorator 4.4.2 pypi_0
dgl 0.5.2 py36_0
freetype 2.5.5 2
future 0.18.2 pypi_0
googledrivedownloader 0.4 pypi_0
h5py 3.0.0 pypi_0
idna 2.10 pypi_0
intel-openmp 2019.4 233
ipykernel 4.6.1 py36_0
ipython 6.1.0 py36_0
ipython_genutils 0.2.0 py36_0
isodate 0.6.0 pypi_0
jbig 2.1 0
jedi 0.10.2 py36_2
jinja2 2.11.2 pypi_0
joblib 0.17.0 pypi_0
jpeg 9b 0
jupyter_client 5.1.0 py36_0
jupyter_core 4.3.0 py36_0
kiwisolver 1.2.0 pypi_0
libcxx 10.0.0 1
libgfortran 3.0.1 h93005f0_2
libpng 1.6.30 1
libtiff 4.0.6 3
llvmlite 0.34.0 pypi_0
markupsafe 1.1.1 pypi_0
matplotlib 3.3.2 pypi_0
mkl 2019.4 233
mkl-service 2.3.0 py36hfbe908c_0
mkl_fft 1.2.0 py36hc64f4ea_0
mkl_random 1.1.1 py36h959d312_0
networkx 2.5 pypi_0
ninja 1.7.2 0
numba 0.51.2 pypi_0
numpy 1.19.2 py36h456fd55_0
numpy-base 1.19.2 py36hcfb5961_0
olefile 0.44 py36_0
openssl 1.0.2l 0
pandas 1.1.4 pypi_0
path.py 10.3.1 py36_0
pexpect 4.2.1 py36_0
pickleshare 0.7.4 py36_0
pillow 8.0.1 pypi_0
pip 20.2.4 pypi_0
prompt_toolkit 1.0.15 py36_0
ptyprocess 0.5.2 py36_0
pygments 2.2.0 py36_0
pyparsing 2.4.7 pypi_0
python 3.6.2 0
python-dateutil 2.8.1 pypi_0
pytorch 1.6.0 py3.6_0
pytz 2020.1 pypi_0
pyzmq 16.0.2 py36_0
rdflib 5.0.0 pypi_0
readline 6.2 2
requests 2.24.0 pypi_0
scikit-learn 0.23.2 pypi_0
scipy 1.5.3 pypi_0
setuptools 36.4.0 py36_1
simplegeneric 0.8.1 py36_1
six 1.10.0 py36_0
sqlite 3.13.0 0
threadpoolctl 2.1.0 pypi_0
tk 8.5.18 0
torch-cluster 1.5.7 pypi_0
torch-geometric 1.6.1 pypi_0
torch-scatter 2.0.5 pypi_0
torch-sparse 0.6.7 pypi_0
torch-spline-conv 1.2.0 pypi_0
torchvision 0.7.0 py36_cpu
tornado 4.5.2 py36_0
tqdm 4.51.0 pypi_0
traitlets 4.3.2 py36_0
urllib3 1.25.11 pypi_0
wcwidth 0.1.7 py36_0
wheel 0.29.0 py36_0
xz 5.2.3 0
zlib 1.2.11 0