CUDA HOME in pytorch installation

筅森魡賤 提交于 2019-12-02 06:45:54

问题


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

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

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

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

this is the error

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

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?


回答1:


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.

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.



来源:https://stackoverflow.com/questions/52298146/cuda-home-in-pytorch-installation

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!