【踩坑日记】(绝对可行)Linux配置python3.8, cuda 11.3, torch 1.11.0, torch-geometric

这篇博客详细记录了如何在Linux环境中成功配置Python 3.8、CUDA 11.3、PyTorch 1.11.0以及torch-geometric库的过程。作者首先确认了初始环境,然后介绍了如何安装torch-geometric,并提供了官方网址。通过测试代码验证了配置的正确性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

(绝对可行)Linux配置python3.8, cuda 11.3, torch 1.11.0, torch-geometric

我使用的是autodl的云环境,初始环境为:

image-20230118223546030

pytorch 1.11.0,python 3.8, cuda 11.3

  1. 先测试torch是否可行
import torch
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
print(device) # cuda
print(torch.version.cuda) # 11.3
print(torch.__version__) # 1.11.0+cu113
a = torch.tensor([1, 2, 3, 4], dtype=torch.float32)
a.cuda() 

(base) zhengyeyang@YuLab103:/mnt/public/zhengyeyang/TiRank/other_methods/cytocommunity/CytoCommunity$ conda env create -f environment_linux.yml /home/zhengyeyang/anaconda3/lib/python3.12/argparse.py:2006: FutureWarning: `remote_definition` is deprecated and will be removed in 25.9. Use `conda env create --file=URL` instead. action(self, namespace, argument_values, option_string) Channels: - pytorch - defaults - msys2 - bioconda - conda-forge Platform: linux-64 Collecting package metadata (repodata.json): done Solving environment: failed PackagesNotFoundError: The following packages are not available from current channels: - pytorch-sparse==0.6.15=py310_torch_1.11.0_cpu - pytorch-scatter==2.0.9=py310_torch_1.11.0_cpu - pytorch-cluster==1.6.0=py310_torch_1.11.0_cpu - pyg==2.1.0=py310_torch_1.11.0_cpu Current channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2 - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2 - https://repo.anaconda.com/pkgs/main - https://repo.anaconda.com/pkgs/r To search for alternate channels that may provide the conda package you're looking for, navigate to https://anaconda.org and use the search bar at the top of the page.
03-16
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值