tensorflowpytorchpipcudaconda

How/Why can pip install CUDA drivers?


Nowadays, installing pytorch or tensorflow with pip also installs CUDA drivers, see e.g. https://www.tensorflow.org/install/pip

Since when / how is that possible? My understanding for a long time was that pip could only install python packages and that one of the most important benefits of conda was that it could also install other stuff.


Solution

  • With pip you can install anything that was packed as a Python wheel. For example you can install Cmake with pip install cmake; it will be installed from https://pypi.org/project/cmake/#files where it has been packaged.

    pip install tensorflow[and-cuda] installs CUDA drivers packaged as wheels: https://pypi.org/project/nvidia-cublas-cu12/ , https://pypi.org/project/nvidia-cuda-runtime-cu12/ and so on…