Как в anaconda navigator добавить tensorflow
Перейти к содержимому

Как в anaconda navigator добавить tensorflow

  • автор:

TensorFlow#

TensorFlow enables your data science, machine learning, and artificial intelligence workflows. This page shows how to install TensorFlow using the conda package manager included in Anaconda and Miniconda.

TensorFlow CPU with conda is supported on 64-bit Ubuntu Linux 16.04 or later and macOS 10.12.6 or later.

TensorFlow GPU with conda is only available though version 2.4.1 (2021). For the latest TensorFlow GPU installation, follow the installation instructions on the TensorFlow website.

Install TensorFlow#

  1. Download and install Anaconda or Miniconda .
  2. Open a terminal application and use the default bash shell.
  3. Choose a name for your TensorFlow environment, such as “tf”.
  4. Use the following commands to install the current release of TensorFlow. CPU-only is recommended for beginners.

CPU-only TensorFlow

conda create -n tf tensorflow conda activate tf 

GPU TensorFlow
Note GPU TensorFlow is only available via conda for Windows and Linux.

conda create -n tf-gpu tensorflow-gpu conda activate tf-gpu 

TensorFlow is now installed and ready to use.

For using TensorFlow with a GPU, refer to the TensorFlow documentation, specifically the section on device placement.

CUDA versions#

GPU TensorFlow uses CUDA. For a version compatibility table for GPU TensorFlow on Linux, see https://www.tensorflow.org/install/source#gpu. For Windows, see https://www.tensorflow.org/install/source_windows#gpu.

GPU TensorFlow conda packages are currently only supported for Windows or Linux.

TensorFlow 2.10 was the last release that supported GPU on Windows Native.

To install GPU TensorFlow with a non-default CUDA version like 9.0, run the following commands:

conda create -n tf-gpu-cuda9 tensorflow-gpu cudatoolkit=9.0 conda activate tf-gpu-cuda9 

Nightly builds#

Advanced users may wish to install the latest nightly build of TensorFlow. These nightly builds are unstable and are only available as pip packages on PyPI.

To install the nightly build of CPU-only TensorFlow:

conda create -n tf-n python conda activate tf-n pip install tf-nightly 

Or, to install the nightly build of GPU TensorFlow on Linux or Windows:

conda create -n tf-n-gpu python conda activate tf-n-gpu pip install tf-nightly-gpu 

How to Install Tensorflow with Anaconda on Windows

In this blog, explore how to harness the power of TensorFlow, a versatile machine learning library, as a data scientist’s essential tool. This tutorial guides you through the seamless installation of TensorFlow using Anaconda on a Windows.

By Saturn Cloud | Tuesday, June 13, 2023 | Miscellaneous

As a data scientist, one of the most important tools in your arsenal is a powerful machine learning library. Tensorflow is one such library that has gained a lot of popularity in recent years due to its ease of use and versatility. In this tutorial, we will walk you through the process of installing Tensorflow with Anaconda on Windows.

Struggling to install TensorFlow with Anaconda on Windows? Remove complex setups in Saturn Cloud with built-in tools for individuals and teams. Join for free.

What is Tensorflow?

Tensorflow is an open-source machine learning library developed by Google Brain Team. It was initially released in 2015 and has since become one of the most popular machine learning libraries. Tensorflow is used for a wide range of applications, including computer vision, natural language processing, and speech recognition.

What is Anaconda?

Anaconda is a popular platform used by data scientists to manage their packages and environments. It comes with a package manager called conda , which makes it easy to install, update, and remove packages. Anaconda also provides a user-friendly interface called Anaconda Navigator, which allows you to manage your packages and environments with a graphical user interface.

Step-by-Step Guide to Installing Tensorflow with Anaconda on Windows

Step 1: Install Anaconda

The first step is to download and install Anaconda on your Windows machine. You can download the latest version of Anaconda from the official website: https://www.anaconda.com/products/individual#windows. Make sure to select the appropriate version (32-bit or 64-bit) depending on your system architecture.

Step 2: Create a New Environment

Once you have installed Anaconda, the next step is to create a new environment for Tensorflow. You can use the following command to create a new environment called tensorflow :

conda create -n tensorflow python=3.8 

This command will create a new environment called tensorflow with Python 3.8 installed.

Step 3: Activate the Environment

After creating the environment, you need to activate it using the following command:

conda activate tensorflow 

Step 4: GPU setup (You can skip this step if you only run Tensorflow on CPU)

First you have to install the NVIDIA GPU driver if it’s not already installed

Next, use conda to install CUDA and cuDNN.

conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0 

Step 5: Install Tensorflow

Before installing Tensorflow, make sure to upgrade your pip to the lastest version as Tensorflow requires a recent version of pip.

pip install --upgrade pip 

Now that you have created and activated the environment, you can install Tensorflow using the following command:

pip install tensorflow 

This command will download and install the latest version of Tensorflow in your environment.

Step 6: Verify the Installation

To verify that Tensorflow is installed correctly, you can open a Python shell and run the following commands:

Verify the CPU setup:
python -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))" 

If a tensor is returned, you’ve installed TensorFlow successfully.

Verify the GPU setup:
python -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))" 

If the output is a list of GPUs, Tensorflow GPU is successfully installed.

Struggling to install TensorFlow with Anaconda on Windows? Remove complex setups in Saturn Cloud with built-in tools for individuals and teams. Join for free.

Conclusion

In this tutorial, we have walked you through the process of installing Tensorflow with Anaconda on Windows. By following these steps, you can quickly set up a new environment for Tensorflow and start building machine learning models. Tensorflow is a powerful library that can help you solve a wide range of machine learning problems, and by using Anaconda, you can manage your packages and environments with ease.

SHARE:
About Saturn Cloud

Saturn Cloud is your all-in-one solution for data science & ML development, deployment, and data pipelines in the cloud. Spin up a notebook with 4TB of RAM, add a GPU, connect to a distributed cluster of workers, and more. Join today and get 150 hours of free compute per month.

Trying to install Tensorflow with Anaconda-navigator but can not find the package in the navigator

I am trying to install Tensorflow with Anaconda-navigator but can not find the package in the navigator. tesnorflow not displayed in not installed section I haven’t installed any of the extra packages like keras, openCV etc. So they must display in the above section. I also tried searching for TensorFlow in the all section enter image description here Also tried the same with base(root) environment. Please help. Even tried installing tensorflow using cmd prompt. That throws an error therefore I want to install it using the navigator only. Thank you in advance

asked Oct 30, 2020 at 10:23
Alisha Maini Alisha Maini
97 2 2 silver badges 12 12 bronze badges

3 Answers 3

Tensorflow isn’t in the «defaults» anaconda channel. It is on conda-forge instead. In order to add conda-forge to your channels:

  1. Click on «channels» (left of where you searched for tensorflow)
  2. Click on «add»
  3. Paste this URL in: https://conda.anaconda.org/conda-forge/
  4. Press enter
  5. Press «Update channels»
  6. Now search again, and it should be there!

answered Oct 30, 2020 at 10:40
118 1 1 silver badge 9 9 bronze badges
I followed the steps you told. But I still can’t see any of the packages there. Any idea?
Oct 30, 2020 at 11:09
Could you send the error you get when trying to install it from the cmd, @AlishaMaini
Oct 30, 2020 at 13:33

You don’t have to paste the url; instead you can add by writing «conda-forge». After follow the steps as usual, It works.

Install TensorFlow and Keras using Anaconda Navigator — without command line

Say no to pip install in command line! An alternative way to install TensorFlow on your machine in 3 steps.

Published in

Towards Data Science

3 min read
May 22, 2019

Why am I writing this?

I played around with pip install with multiple configurations for several hours, tried to figure how to properly set my python environment for TensorFlow and Keras.

Just before I gave up, I found this…

This article will walk you through the process how to install TensorFlow and Keras by using GUI version of Anaconda. I assumed you have downloaded and installed Anaconda Navigator already.

Let’s get started!

  1. Launch Anaconda Navigator. Go to Environments tab and click ‘Create’.

2. Input new environment name, I put ‘tensorflow_env’. Make sure to select Python 3.6 here! Then ‘Create’, this may take few minutes.

3. At your new ‘tensorflow_env’ environment. Select ‘Not installed’, type in ‘tensorflow’. Then, tick ‘tensorflow’ and ‘Apply’. The pop-up window will appear, go ahead and apply. This may take several minutes.

Do the same for ‘keras’.

Check your installation by importing the packages. If everything is okay, the command will return nothing. If the installation was unsuccessful, you will get an error.

And…Ta-da! It’s done! You can follow this article to test your newly installed packages 🙂

Thank you for reading. Please give it a try, and let me know your feedback!

Consider following me on GitHub, Medium, and Twitter to get more articles and tutorials on your feed. If you like what I did, don’t hit the clap button just once. Hit it 50 times 😀

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *