Reputation: 21
I am having problems with uninstalling TensorFlow.
I have a Python script that uses TensorFlow. I want it to use TensorFlow1.15, but it is currently using TensorFlow 2.1.0. I deleted TensorFlow via my cmd: pip uninstall tensorflow
and pip uninstall tensorflow-gpu
. When I run these commands again it says that TensorFlow is not installed. However, I can see that my script says it is using TensorFlow 2.1.0 (I added the line:print(tf.__version__)
in my script). Does anyone know where this TensorFlow 2.1.0 is installed and how I can delete it from my PC?
Upvotes: 0
Views: 11733
Reputation: 303
Also you can downgrade tensorflow
by this command in Pycharm terminal
:
python -m pip install --user --upgrade tensorflow==1.15
It can also be used for other libraries.
Upvotes: 2
Reputation: 1445
Now you '+' button on rightmost tool bar "click" it finally installed package
if still package is not installed or pycharm showing error then you have to remove tensorflow from base root and reinstall it
Upvotes: 0
Reputation: 880
From the above-provided information it is difficult to ascertain the scenario in which you are trying to uninstall. I suggest creating a new python environment for your project using anaconda-
follow these steps -
conda create -n yourenvname python=3.6
conda install tensorflow-gpu==1.15
your env in windows might be in windows installation drive - > users -> anaconda3 -> envs
Upvotes: 0
Reputation: 12130
This problem means that you use different pythons in your terminal and your script.
You mentioned PyCharm. By default, it creates a virtual environment for a new project. It also can use your global python. In any case, open a terminal in PyCharm (it should be in the bottom of the window or View -> Tool Windows -> Terminal
or Option + F12
on Mac, Alt + F12
on Windows). From there you should run pip uninstall tensorflow
. PyCharm automatically activates the correct python environment in the terminal.
Upvotes: 0