pytorch +cuda成功安装后, torch.cuda.is_available 是False

本质原因是: 清华源里的pytorch 没有cuda 。

https://pypi.tuna.tsinghua.edu.cn/simple/torch/

安装命令

bash 复制代码
pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu118 -i https://pypi.tuna.tsinghua.edu.cn/simple

正确的命令

bash 复制代码
pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://mirrors.nju.edu.cn/pytorch/whl/cu118
相关推荐
鬼先生_sir5 分钟前
Spring AI Alibaba 1.1.2.2 完整知识点库
人工智能·ai·agent·源码解析·springai
2401_8274999913 分钟前
python项目实战09-AI智能伴侣(ai_partner_5-6)
开发语言·python
深念Y15 分钟前
豆包AI能力集成方案:基于会话管理的API网关设计
人工智能
PD我是你的真爱粉15 分钟前
MCP 协议详解:从架构、工作流到 Python 技术栈落地
开发语言·python·架构
龙文浩_16 分钟前
Attention Mechanism: From Theory to Code
人工智能·深度学习·神经网络·学习·自然语言处理
ulimate_16 分钟前
八卡算力、三个Baseline算法(WALLOSS、pi0、DreamZero)
人工智能
ZhengEnCi19 分钟前
P2G-Python字符串方法完全指南-split、join、strip、replace的Python编程利器
python
深小乐25 分钟前
AI 周刊【2026.04.06-04.12】:Anthropic 藏起最强模型、AI 社会矛盾激化、"欢乐马"登顶
人工智能
微臣愚钝30 分钟前
prompt
人工智能·深度学习·prompt
是小蟹呀^33 分钟前
【总结】LangChain中工具的使用
python·langchain·agent·tool