Closed the-butterfly closed 5 years ago
Oh, Anaconda often doesn't make life easier :(
Most likely, you have two different CUDA toolkits (maybe one in Anaconda and one system-wide) and your PyTorch is using one version while setup.py
picks up another.
Check your PyTorch's CUDA version via torch.version.cuda
. Then, before build, set CUDA_HOME
environment variable to the location of that toolkit. Example:
rm -rf build/
CUDA_HOME=/usr/local/cuda-9.2 python3 -m pip install .
By the way, if you use the CUDA toolkit that is shipped by Anaconda, keep in mind that it is not a real toolkit but some truncated version of it, which is unsuitable for compiling. That might also be the cause.
Thanks for your meticulous reply! I have just re-install pytorch 1.0.1 with cuda 10, and make install again, everything works fine.
@the-butterfly, can you tell me if you installed pytorch from source or by using pip? Is your system's CUDA version different from the one installed with torch?
I think system's CUDA version should match with torch. And my pytorch is installed by pip.
Okay, thanks
Success build with ubuntu 16.04, cuda 10 and gcc 7.4. But import error encountered:
@shrubb