0
$\begingroup$

I want to install PyTorch and for that I visited PyTorch official website, and they give me a command to install it with Cuda:

pip3 install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio===0.9.0 -f https://download.pytorch.org/whl/torch_stable.html

The version of Cuda, they want me to install for PyTorch, is 11.1. But I already have Cuda install in my computer which is Cuda 11.2 (for TensorFlow 2.5.0). My question is if I install PyTorch with that command they gave me, will it remove Cuda 11.2 ? If it removed Cuda 11.2 and replace it with Cuda 11.1, then TensorFlow won't be able to run on GPU. Do I have to sacrifice TensorFlow in order to use PyTorch ? Is there any method to them keep both ?

$\endgroup$

1 Answer 1

1
$\begingroup$

One way to sort out your issue is to create virtual environments. Below are two ways to set up virtual environments

  • pip virtual environment
  • conda virtual environment

I suggest to go for setting up anaconda (conda) virtual environment for different versions of Tensorflow, Pytorch, CUDA

Follow this guide, Guide to conda for tensorflow and pytorch

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.