Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

python - Anaconda installs TensorFlow 1.15 instead of 2.0

I've been trying to install Tensorflow 2.0 in Anaconda.

So far, tensorflow works fine (i can use the library in my code), but when i'm installing it, it says "installing version: 2.0", then i get version 1.15 instead.

The whole package results updatable (since versione 2.0 does exist and should be available), but even if i try to update it, i keep getting 1.15, which gets back to updatable, and i get back into the loop.

I tried both from the Anaconda Navigator interface and the prompt using conda update tensorflow, without any success.

Here's there is the link package: tensorflow 2.0 Anaconda

How can i solve the problem?

EDIT :

I successfully installed TensorFlow 2.0 using conda install -c anaconda tensorflow. Then i got back into Anaconda Navigator and i tried to install Keras 2.2.4.

Looking at the installed packages, seems that installing Keras overwrites the version 2.0 of TensorFlow with the 1.15, am i wrong? Is this a bug?

Here's the image: Keras install

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Another alternative is to install Tensorflow with Miniconda.

I simply have used Miniconda3 for windows and I was able to install multiple versions of Tensorflow on different environment respectively.

Example 1

// create a new environment
conda create --name workflowone

// activate environment
conda activate workflowone

// Install desired package
conda install tensorflow=1.15

// deactivate environment
conda deactivate

Example 2

// create a new environment
conda create --name workflowtwo

// activate environment
conda activate workflowtwo

// Install desired package
conda install tensorflow  // If you do not specify the version, you will download the latest version of Tensorflow

// deactivate environment
conda deactivate

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...