DEV Community

Cover image for Guide to install PyTorch with CUDA on Ubuntu 18.04

Guide to install PyTorch with CUDA on Ubuntu 18.04

Ivan Iliukhin on December 20, 2019

Guide to install PyTorch with CUDA on Ubuntu 18.04 Yesterday I was installing PyTorch and encountered with different difficulties duri...
Collapse
 
jota87r profile image
Jonatán Ramírez Aldana

I'm getting the following error while trying to install the cuda toolkit:

The following packages have unmet dependencies:
cuda : Depends: cuda-11-2 (>= 11.2.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Does anyone knows how to fix this?

Collapse
 
jodyngo profile image
jodyngo

Please advise me to solve this issue:
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
dirname: missing operand

Collapse
 
evanilukhin profile image
Ivan Iliukhin • Edited

It looks like the command $(which conda) returned nothing. Also, I recommend to try without exporting that env variable

Collapse
 
evanilukhin profile image
Ivan Iliukhin

Interesting question! I know only about the PyTorch and haven't searched other.