win10安装torch和tensorflow-gpu并使用yolov8

使用acaconda 安装
python = 3.9 cuda11.8 cudnn11x

pytorch2.2.0需求 python>=3.8

tensorflow-gpu-2.6.0 需要python=3.9
url=https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-2.6.0-cp39-cp39-win_amd64.whl

typing-extensions冲突 更新至4.8.0 解决
protobuf冲突 更新至3.19.6 解决

安装:
psutil
matplotlib 此时降级numpy 依赖冲突
pyyaml
tqdm
pandas

最后是numpy冲突升级至1.19.2
升级失败
尝试使用conda下载

matplotlib 冲突 需求numpy>=1.21
继续用conda升级1.21

报错:ImportError: C extension: None not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext' to build the C extensions first.
numpy和pandas冲突
继续conda升级numpy至1.22.4 conda无 进行搜索后决定升级1.23.1

虽然运行报错,但为代码问题,本次安装成功结束

总结:

我显卡是2070,驱动版本支持到cuda12本次使用的是11.8

#下载pytorch
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
#下载tensorflow
pip install tensorflow-gpu==2.6.0
#双方有依赖冲突
pip install typing-extensions==4.8.0
pip install protobuf==3.19.6


#使用yolov8 安装其他依赖
pip install psutil
pip install matplotlib 此时降级numpy 依赖冲突
pip install pyyaml
pip install tqdm
pip install pandas

conda install numpy=1.23.1

  • 7
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值