9951 explained code solutions for 126 technologies


python-pytorchHow do I uninstall Python PyTorch?


  1. To uninstall PyTorch, you first need to determine which version of Python you are using.

  2. If you are using Python 3, you can use the following command in the terminal: pip3 uninstall torch

  3. If you are using Python 2, you can use the following command in the terminal: pip uninstall torch

  4. After running either of these commands, you should see the following output:

Successfully uninstalled torch-1.4.0
  1. You can also uninstall PyTorch from the Anaconda Navigator. Simply open the Anaconda Navigator and select the Environments tab. Select the environment that has PyTorch installed and click on the Uninstall button.

  2. If you are using Windows, you can also uninstall PyTorch using the Control Panel. Go to Control Panel > Uninstall a program and select PyTorch to uninstall it.

  3. Finally, you can also uninstall PyTorch using the conda command. Run the following command in the terminal: conda uninstall torch

Helpful links

Edit this code on GitHub