How to Uninstall Pytorch ( conda, pip ,Pycharm )

How to Uninstall Pytorch

Pytorch is an open-source machine learning library. It is a framework that has been built upon the torch library. Using PyTorch you can build a computer vision and Natural Processing Language ( NLP ) application. If you have already installed pytorch in your system and want to uninstall it from your system then this post is for you. In this entire tutorial, you will learn how to uninstall PyTorch on different terminals.

How to uninstall PyTorch with Anaconda?

If you have installed Pytorch on Anaconda and want to uninstall it then you can use the conda command for that. Open your anaconda terminal and type the following conda command.

conda uninstall pytorch

It will successfully uninstall the Pytorch from the anaconda packages.

Uninstalling pytorch on anaconda prompt
Uninstalling pytorch on anaconda prompt

Uninstall PyTorch using pip

There is also another way to remove Pytorch from the python packages. To do you have to use the pip command.  Pip is a python module that is already installed with the python module.

Before using the pip command you have to check the version of the python. If your system has python 3. xx installed then you will use the pip3 command. And if your system has python 2. xx then you will use the pip command.

To check the version of the python you have to run the below command.

python --version

Output

Checking Python version before installing spacy
Checking the Python version before installing spacy

My system has python 3. xx installed, so I will use the pip3 command to uninstall PyTorch.

Run the below command to uninstall the PyTorch using pip.

pip3 uninstall torch
Unsitalling pytorch using the pip
Uninstalling PyTorch using the pip

Uninstall PyTorch from Pycharm

If you have installed PyTorch in pycharm, then you can easily uninstall PyTorch.  Follow the below steps to uninstall PyTorch from Pycharm.

Step 1: Go to File and click settings.

Step 2: Go to the project Interprete.

Here you will find all the packages installed in your PyTorch environment.

Installed Packages list in Pycharm
Installed Packages list in Pycharm

Step 3: Search for the torch package.

Step 4: Select on torch package and click on the ” – “ sign to uninstall the torch package.

Uninstalling Pytorch from Packages list in Pycharm
Uninstalling Pytorch from Packages list in Pycharm

Conclusion

Pytorch is a popular machine learning library for OpenCV and NLP applications. This framework is managed by open-source community and built by Facebook. If you want to uninstall Pytroch from your system then the above methods will work for you. I hope you have liked this tutorial. If you have any queries then you can contact us for more help.

Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for signup. A Confirmation Email has been sent to your Email Address.

Something went wrong.

 
Thank you For sharing.We appreciate your support. Don't Forget to LIKE and FOLLOW our SITE to keep UPDATED with Data Science Learner