Ubuntu20安装torch1.13和pytorch_geometric2.3.0(对应cuda11.6)

pip install torch==1.13.0+cu116 torchvision==0.14.0+cu116 torchaudio==0.13.0 --extra-index-url https://download.pytorch.org/whl/cu116

  • 安装torch2.3.0 https://pytorch-geometric.readthedocs.io/en/2.3.0/install/installation.html,我的python版本3.8符合,pytorch1.13.0,cuda11.6
  • 首先安装对应库,参考官方版本
    pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-1.13.0+cu116.html
  • 有个小问题,安装到torch_cluster就不动了,一直在Building wheel for torch_cluster (setup.py) ...打转,选择手动安装,在这下载对应包https://data.pyg.org/whl/torch-1.13.0+cu116.html,搜索torch_cluster,选择cp38我是python38复制对应链接
    wget https://data.pyg.org/whl/torch-1.13.0%2Bcu116/torch_cluster-1.6.0%2Bpt113cu116-cp38-cp38-linux_x86_64.whl
    pip install torch_cluster-1.6.0+pt113cu116-cp38-cp38-linux_x86_64.whl
  • 可能之前依赖问题,运行时候出错UserWarning: An issue occurred while importing 'pyg-lib'. 可以卸载再重新安装,推荐还是一个库一个库安装
    pip install pyg_lib -f https://data.pyg.org/whl/torch-1.13.0+cu116.html
  • 指定版本号安装torch_geometric==2.3.0
    pip install torch_geometric==2.3.0 -f https://data.pyg.org/whl/torch-1.13.0+cu116.html
  • 起因:之前版本是torch_geometric2.0.4,使用GAT报错ImportError: cannot import name 'DenseGATConv' from 'torch_geometric.nn',查了一下文档在2.3.0才引入这个函数https://readthedocs.org/projects/pytorch-geometric/,还得把nvidia-smi升级到535
相关推荐
第九序言T2 小时前
Python 数据处理进阶(十八)批量处理同结构文件:一个文件夹一次跑完
开发语言·python·自动化·pandas·数据处理
Java后端的Ai之路2 小时前
CAS并发控制-从CPU指令到企业级乐观锁
vue.js·人工智能·python·cas·乐观锁
qq_426003962 小时前
UI自动化高频次登录login限流解决方案
python·ui·自动化
Sakura_j_h_2 小时前
EasyEDA PCB 快速设计Skills
c++·python·github
quantdash_cc3 小时前
如何验证历史行情的交易日期是否完整覆盖研究区间?
python·数据分析·pandas·量化交易·股票数据·quantdash
I Am a robert girl3 小时前
当智能体学会“串通”:从长程交互中读懂涌现式合谋
python·多智能体系统·多智能体协作·llm agent·涌现式合谋·对齐问题·激励机制设计
云和数据.ChenGuang4 小时前
光哥说Python RAG 系统需要哪些评估指标:从检索到生成的全链路评测指南
网络·人工智能·python·算法·langchain
专注仿真4 小时前
线性回归和逻辑回归算法详解
开发语言·人工智能·python·大模型训练·控制算法
wflynn5 小时前
GitHub 今日推荐|Edge0:让大号 MoE 模型在一台 Mac 上流式跑起来
python·开源·github
2601_967980116 小时前
python之用scapy分层解析pcap报文(Ethernet帧、IP数据包、TCP数据包、UDP数据包、Raw数据包)
python·scapy·pcap·协议分析·网络数据包