pytorch安装中的CUDA HOME [英] CUDA HOME in pytorch installation
问题描述
我使用conda 7.5通过conda安装了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工具包安装。它仅包含支持 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.
这篇关于pytorch安装中的CUDA HOME的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!