安装 Graph Learning

查看源文件  

安装指南

确认系统环境信息

安装方式

可以采用pip安装或者源码编译安装两种方式。

pip安装

  • Ascend/CPU

    pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/2.0.0rc1/GraphLearning/cpu/{system_structure}/mindspore_gl-0.2-cp37-cp37m-linux_{system_structure}.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple
    
  • GPU

    pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/2.0.0rc1/GraphLearning/gpu/x86_64/cuda-{cuda_verison}/mindspore_gl-0.2-cp37-cp37m-linux_x86_64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple
    
  • 在联网状态下,安装whl包时会自动下载MindSpore Graph Learning安装包的依赖项(依赖项详情参见requirements.txt),其余情况需自行安装。

  • {system_structure}表示为Linux系统架构,可选项为x86_64arrch64

  • {cuda_verison}表示为CUDA版本,可选项为10.111.111.6

源码安装

  1. 从代码仓下载源码

    git clone https://gitee.com/mindspore/graphlearning.git
    
  2. 编译安装MindSpore Graph Learning

    cd graphlearning
    bash build.sh
    pip install ./output/mindspore_gl-*.whl
    

验证是否成功安装

执行如下命令,如果没有报错No module named 'mindspore_gl',则说明安装成功。

python -c 'import mindspore_gl'