Frederique Voskeuil
Frederique Voskeuil

Reputation: 21

Uninstall tensorflow 2.1.0

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

Answers (4)

Mohsen Hrt
Mohsen Hrt

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

Welcome_back
Welcome_back

Reputation: 1445

File ->Setting enter image description here

enter image description here

enter image description here

enter image description here

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

Mukul
Mukul

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 -

  1. download exe file for Anaconda website
  2. install it.
  3. open cmd
  4. create new env using this command conda create -n yourenvname python=3.6
  5. install tensorflow 1.15 by conda install tensorflow-gpu==1.15
  6. go to pycharm select your new conda environment.(File -> setting -> project -> project interpreter - > insert path for env)

your env in windows might be in windows installation drive - > users -> anaconda3 -> envs

Upvotes: 0

Yevhen Kuzmovych
Yevhen Kuzmovych

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

Related Questions