If you are looking to install Tensorflow-GPU on your system, then this blog is for you. Follow the step-by-step guide and you will be up and running in no time.
Check out our video:
Today we’ll be installing Tensorflow-GPU on Anaconda Windows 10. Tensorflow is a powerful open-source software library for data analysis and machine learning. The Anaconda distribution comes with many tools required for machine learning and data science, so it’s ideal for getting started with Tensorflow.
We’ll be using the Anaconda Prompt to install Tensorflow. The Anaconda Prompt is a command line interface that comes with the Anaconda distribution. To open the Anaconda Prompt, go to the Start menu and search for “Anaconda Prompt”.
Once the Anaconda Prompt is open, we’ll need to create a new virtual environment for Tensorflow. Virtual environments are separate spaces on your computer where you can install different versions of Python and packages without affecting other virtual environments or your system Python installation. To create a new virtual environment, type the following into the Anaconda Prompt:
conda create -n tfgpu python=3.6
This will create a new virtual environment called “tfgpu” using Python 3.6. You can use any name you like for your virtual environment; we just chose “tfgpu” because it indicates that this environment is for Tensorflow with GPU support.
Next, we’ll need to activate the new virtual environment so that we can install packages into it. To activate the “tfgpu” environment, type the following into the Anaconda Prompt:
You should now see “(tfgpu)” at the beginning of the prompt line to indicate that you are in the “tfgpu” environment. Now that we’re in our new virtual environment, we can install Tensorflow-GPU by typing the following into the prompt:
In order to use TensorFlow with GPU support on Windows 10, you must have a NVIDIA graphics card with a minimum compute capability of 3.5. If you have an earlier version of TensorFlow installed, you can upgrade using pip install – upgrade tensorflow-gpu.
Before installing TensorFlow, check your system requirements:
Operating System: Windows 7 or later (64-bit)
Processor: Intel® Core™ i5-7300HQ CPU or faster
Memory: 8 GB RAM or more
Storage: 256 GB solid state drive (SSD) PCI Express 3.0 bus interface
Installing Tensorflow-GPU on Anaconda Windows 10 can be a little bit tricky, but luckily we have all the steps laid out for you. Here’s what you need to do:
1. Update your graphics drivers. This is critical! You can usually find the latest drivers for your graphics card on the manufacturer’s website.
2. Download and install Anaconda. Make sure to download the version for Python 3.6 or 3.7, as Tensorflow is not compatible with Python 2.x.
3. Create a new Anaconda environment, and make sure to specify Python 3.6 or 3.7 as the version you want to use.
4. Activate your new environment and run the following command to install TensorFlow-GPU: pip install tensorflow-gpu==1.12.*
5. That’s it! You should now be able to run TensorFlow programs on your GPU-powered machine.
Testing the Installation
Now that you have installed TensorFlow, it is time to test whether your installation is working properly. To do this, open the Anaconda Prompt and type “python”. This will open up the Python interpreter where you can type in commands and run them immediately.
First, we will check the version of TensorFlow that is installed. Type the following into the interpreter:
>>> import tensorflow as tf
You should see something like “1.8.0” printed on the screen, which indicates that TensorFlow has been successfully installed on your system.
If you see an error message instead of a version number, it means that either you do not have TensorFlow installed or your installation is not working properly. Please make sure that you have followed all of the instructions in this guide carefully and try again.
You can uninstall TensorFlow-GPU by opening Anaconda Navigator and going to the Environments tab. Select TensorFlow-GPU from the list of available packages and click Uninstall at the bottom.
We have now installed Tensorflow-GPU on Anaconda Windows 10. We have also set up our environment so that we can run Tensorflow programs using GPU acceleration.
Frequently Asked Questions
Q: Which versions of TensorFlow are available?
A: TensorFlow 2.0 is the latest version of TensorFlow.
Q: How do I install TensorFlow-GPU on my Anaconda distribution?
A: The easiest way to install TensorFlow-GPU is to use the pip package manager. Simply type the following command at the Anaconda Prompt:
pip install tensorflow-gpu==2.0.0-rc1
You can also install TensorFlow-GPU from source. Visit tensorflow.org for instructions on how to build from source.
If you have not done so already, we recommend following the instructions in how to install Anaconda Python 3.6 on Windows 10 by Michael Galarnyk.
Once you have Anaconda installed, create a new environment named tensorflow-gpu.
$ conda create -n tensorflow-gpu python=3.6
If you have any questions or would like more information, please contact us.
About the Author
I’m a senior data scientist at Figure Eight. I have a Ph.D. in Neuroscience from UC Berkeley, and did my postdoctoral work at the University of Washington. I’m originally from Brazil, and have been living in the San Francisco Bay Area for the past 10 years.
I’m passionate about using data science to solve real-world problems, and have experience working in a variety of industries, including healthcare, retail, and FinTech.
In my free time, I enjoy cooking, hiking, and spending time with my dog.”
Keyword: How to Install Tensorflow-GPU on Anaconda Windows 10