Installing Anaconda for Python and Running TensorFlow in Jupyter Notebook.

Mj Cheruiyot
6 min readAug 10, 2020

--

Anaconda is a free and open distribution of Python and R distribution equipped with all the necessary tools needed for data science and machine learning applications with over 150 packages included for instance Python core language.

The package management system for Anaconda is Conda, and you will use the Conda Install command to install packages, similar to the pip installer in regular Python. There is also a Conda Build function that allows you to create your own customized packages and share them.

Anaconda is specifically geared towards developers. It is essential as it makes installing, updating and removing packages much simpler. It also comes with Jupyter Notebook, which is a web-based interface which gives you live code and visualization all in one place, which can be very helpful for most developers.

Importance of having Anaconda.

  • It comes with python distribution and libraries preinstalled.
  • It brings most tools used in data science and machine learning together within just one click.
  • The virtue of environment enables it to isolate different libraries and versions.
  • Has a short and simple set up.
  • It is secure.

This article will help guide you through the installation of Anaconda and eventually running Tensor Flow in Jupyter Notebook step by step.

If you wish watch the tutorial, you could use it for reference too.

Procedures for Installation of Anaconda and Jupyter Notebook.

  1. Go the official Anaconda website, www.anaconda.com.

2. On the menu bar click on products, select individual edition it is meant for open source. Click the Download button, that will lead you to the download specifications.

3. You will then choose the platform you want to use Anaconda on the site offers available versions for the three platforms, Windows, maOs or Linux.

4. Choose the version you want and click Download. I went with Windows 10, 64-Bit Graphical Installer(466 MB).

5. Choose the ideal directory where you want to save the file and click Save.

6. After the download is completed, you will go to the location of the download and run the executable file and the installation will begin.

7. The first window of the installation setup gives you some recommendations to make the installation process faster,. After you have followed those recommendations, click Next.

Recommendations Page.

8. The next window is the License Agreement terms, click on” I agree” to proceed.

Agreement.

9. The next window will ask you to choose whether to install Anaconda for only one user or all the user accounts. Select the preferred choice and click Next.

Installation Type.

10. The next window shows the Destination Folder where Anaconda will be stored on your system and the space that will be required. Choose your desirable location and click Next.

Destination Folder.

11. The next window consists of Advanced Installation Options, select desired selections and click Install to proceed. The program will begin installing and will take a while. Once it has finished installing, click on Next.

Advanced Installation Options.

12. The next window gives you an option to also install Visual Studio code if you want. Click on Install Visual code button if you want it to be installed or simply click the Skip button if not interested.

13. The next window is a Thank You message with two check-boxes that you can either check or not that will help you get started with Anaconda and learn more about it then click Finish button to complete the installation process.

Final Installation Process.

14. Once it is installed, search for Anaconda prompt and then run it. Here, you can check the version of Python and Conda installed.Using the command below;

python --version

You also have an option to update python version to a current version.

conda update python

The command updates the python version to a most recent version.Which as per now is Python 3.8.3.

15. To start Jupyter Notebook, simply type Jupyter notebook and press enter. A prompt will pop up asking you which browser you will want to launch it on. Choose your desired website and it will open.

jupyter notebook
This is the expected output,If you get this then Anaconda is already added to your path.

16. The command opens up your IDE on a browser and you are good to go.

Jupyter Notebook on browser.

17. To interrupt the running of your jupyter notebook ,just press

ctrl+cc

Installing and Running TensorFlow -GPU.

Anaconda makes it really easy to install TensorFlow and since we already have the first part of this installation,I’ll take you through commands that will enable you have a TensorFlow environment and be able to run TensorFlow on Jupyter.

  1. Open the Anaconda Prompt.
  2. Create a virtual environment and choose a name for it like “tensorflow” or simply “tf.”
conda create -n tensorflow

You’ll get a command asking if you like to proceed; click y

Proceed ([y]/n)? y

3. Having the environment now we can activate our environment.

activate tensorflow

This doesn’t give you much feedback but the environment is activated if the next command line shows that you are in the environment already.

(tensorflow) indicated that you are in the environment.

4. Inside the environment install tensorflow using pip.The procedure might take some time due to the download of packages and libraries.

pip install tensorflow

After the installation is done shutdown your Anaconda prompt before the next step.

5. Open Anaconda prompt from the start button on your screen.

Then activate tensorflow using the command below;

activate tensorflow

6. Install TensorFlow-GPU kernel using command below.

python -m ipykernel install — user — name tensorflow — display ‘TensorFlow-GPU’

7.Open your Jupyter Notebook.

jupyter notebook

On your browser window on the New drop down button check if ‘TensorFlow-GPU’ is among the Kernel Options.Click on it and your new page opens up to be worked on.

This is how your new page appears with TensorFlow running.

9. You could add more libraries you’d love to use using Anaconda prompt commands.

conda install pandas matplotlib jupyter notebook scipy scikit-learn

Conclusion.

This tutorial is a quick guide of installation of Anaconda Python for Windows 10 and Installation of TensorFlow to run in Jupyter Notebook.I hope this gives you an easy walk through the installation.

I recommend this for Machine Learning beginners and Data Science Juniors who are in this growth journey with me.

Subscribe to my YouTube channel for similar content and more.

If you have any questions or need any clarifications leave it in the comments section.

--

--

Mj Cheruiyot

Analytics Engineer/ Data Enthusiast/ Lover of Technology