CUDA HOME 在 pytorch 安装 [英] CUDA HOME in pytorch installation
问题描述
我通过 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:在您的 $PATH 中找不到 nvcc 二进制文件.要么将其添加到您的路径中,要么设置 $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 工具包安装.它只包含必要的库和工具来支持 numba
和 pyculib
以及他们分发的其他 GPU 加速二进制包,如 tensorflow
和 pytorch
.
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.
这篇关于CUDA HOME 在 pytorch 安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!