Reputation: 141
The following image shows various versions of tensorflow installed however I am not able to uninstall it.
I tried pip, pip3, conda and still it does not recognise tensorflow.
I even tried all the possibilities from this thread Tensorflow: why 'pip uninstall tensorflow' cannot find tensorflow
How to remove Tensorflow completely ?
Upvotes: 12
Views: 93648
Reputation: 1
What worked for me was
pip uninstall tensorflow
Then I installed it using this
Check your gpu setup and install accordingly. Should work fine.
Upvotes: 0
Reputation: 311
If the previous answers did not work, try:
python -m pip uninstall tensorflow
directly in Command Prompt (for windows) instead of running the code in jupyter or VS.
if you had installed tensorflow-gpu previously, you should edit above code same as below in the command prompt:
python -m pip uninstall tensorflow-gpu
Upvotes: 1
Reputation: 37
Mine froze while uninstalling (!pip uninstall tensorflow). It was because the cmd tried to prompt whether to untinue "(Y/n) ?". The solution was to type "pip uninstall tensorflow" directly in the cmd and not in the notebook
Upvotes: 0
Reputation: 248
Did you try uninstalling by removing protobuf first and then tensorflow
sudo pip uninstall protobuf
sudo pip uninstall tensorflow
And most probably you didn't installed tensorflow via conda that's why you were getting that error(package not found) To figure out which package was used to install the particular package you can list using the following command
conda list
pip list
. ...etc
And use appropriate command to uninstall the package
Upvotes: 5
Reputation:
Try "pip uninstall tensorflow-___" at the place of dashes add CPU or gpu according to the build that you have installed.
Upvotes: 2
Reputation: 61
In case you created virtual environment then activate it.
.\venv\Scripts\activate
notice (venv) before the command prompt.
now...
pip uninstall tensorflow
this worked for me!
Upvotes: 1
Reputation: 1288
You can delete any python package that was installed globally, manually by going into your global site-packages
folder and deleting the files manually.
pip show tensorflow
should give you, dependant on your version of pip the location of tensorflow on your machine.
Usually its /usr/lib/pythonX.X/site-packages
where X.X
can be substituted with your version of python/pip. The same should work for Windows machines.
You can then uninstall tensorflow bydeleting the folder tensforflow. You most likely will require sudo
priveliges.
After you are done, there should be no traces of tensorflow on your machine.
Upvotes: 1