移动云使用经验(三)安装marl所需包 (pytorch, gym, mpe)
作者:互联网
1 安装pytorch
首先按照(二)用conda新建虚拟环境,建议用python3.8,首先激活虚拟环境并参考博文添加清华源,然后按照官网运行如下指令:
conda activate #env_name
conda install pytorch=1.10.0 cudatoolkit=10.2
我只安装了torch。(博客写于20220228,未来指令可能会改变)
然后安装torch_geometric
pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.10.1+cu102.html pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.10.1+cu102.html pip install torch-geometric
可以用如下代码测试pytorch的安装
import torch torch.cuda.is_available() torch.__version__
用如下代码验证torch_geometric是否安装
import torch_geometric print(torch_geometric.__version__)
2 安装mpe
首先安装相关包:gym
pip install gym==0.10.5
P.S. gym==0.10.5,不然报prng相关的错误;
(TODO)
标签:需包,marl,gym,torch,pytorch,install,pip,geometric,安装 来源: https://www.cnblogs.com/guesswhoiscoming/p/15865709.html