pytorch 安装中的 CUDA HOME [英] CUDA HOME in pytorch installation

查看:47
本文介绍了pytorch 安装中的 CUDA HOME的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过 conda 和 cuda 7.5 安装了 pytorch

I installed pytorch via conda with cuda 7.5

conda install pytorch=0.3.0 cuda75 -c pytorch

>>> import torch
>>> torch.cuda.is_available()
True

除此之外我没有为 cuda 进行任何其他安装,因为它看起来像 pytorch 带有 cuda

I didn't do any other installations for cuda other than this, since it looks like pytorch comes with cuda

现在,我正在尝试设置 yolo2 https://github.com/longcw/yolo2-pytorch

Now, I am trying to setup yolo2 https://github.com/longcw/yolo2-pytorch

但是,我在 ./make.sh 命令中遇到错误

However, I am getting error in ./make.sh command

这是错误

OSError:nvcc 二进制文件无法位于您的 $PATH 中.将其添加到您的路径中,或设置 $CUDAHOME

OSError: The nvcc binary could not be located in your $PATH. Either add it to your path, or set $CUDAHOME

我假设我需要在我的路径中设置 CUDAHOME,但我无法找到任何具有 nvcc 二进制文件的 cuda 目录.有什么指示吗?

I'm assuming I need to set CUDAHOME in my path, but I am not able to locate any cuda directory having nvcc binary. Any pointers on it?

推荐答案

通过 anaconda 分发的 CUDA 包不是完整的 CUDA 工具包安装.它仅包含支持 numbapyculib 以及它们分发的其他 GPU 加速二进制包的必要库和工具,例如 tensorflowpytorch.

The CUDA package which is distributed via anaconda is not a complete CUDA toolkit installation. It only includes the necessary libraries and tools to support numba and pyculib and other GPU accelerated binary packages they distribute, like tensorflow and pytorch.

如果您需要一个功能齐全的 CUDA 工具包(您似乎确实需要),您需要自己安装一个.明智的说法——安装与您在 anaconda 中安装的版本相同的版本.稍加修改 PATH,一切都应该正常工作.

If you need a fully functional CUDA toolkit (and it seems you do), you will need to install one yourself. Word to the wise -- install the same version that you have installed within anaconda. With a tiny bit of PATH modification, everything should just work.

这篇关于pytorch 安装中的 CUDA HOME的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆