![1VASEnnQEQEUPFV1DTaS4Tw.png](https://quantinsightsnetwork.com/wp-content/uploads/2024/07/1VASEnnQEQEUPFV1DTaS4Tw-678x381.png)
Machine learning and deep learning have become integral to many modern applications, from predictive analytics to natural language processing. TensorFlow and Keras are two of the most popular libraries for these tasks. In this guide, we’ll walk through the steps to install TensorFlow and Keras in a Jupyter Notebook environment on both Mac and PC.
Go to Anaconda Distributer https://www.anaconda.com/download/success
select the appropriate installer and install the software.
If you already have anaconda installed, you can skip this step.
Before launching the Jupyter Notebook:
- Mac: Open the Terminal
- Windows: Open Anaconda command prompt
In this guide, we’ll proceed with the Terminal.
create a conda environment using the following command:
conda create --name
Replace
with a suitable name for your environment. For example, you can use tensorflow
:
When prompted with Proceed ([y]/n)?
`, enter y
. Do the same if prompted in subsequent steps.
Activate the created environment using the command:
conda activate
Replace
with your environment name, for example: conda activate tensorflow
`.
If activated properly, the environment name should show in the terminal instead of base
as shown below.
Install TensorFlow using the following command:
conda install -c conda-forge tensorflow
That’s it! TensorFlow is now installed.
First, install ipykernel
using the command:
conda install -c anaconda ipykernel
Next, set up the environment in Jupyter Notebook with the following command:
python -m ipykernel install --user --name=
Replace
with your environment name
Below image is the example of the command. After Executing it shows that the tensorflow environment in added to the specific path.
This command adds the environment to the Jupyter Notebook kernel.
Launch the jupyter notebook from the anaconda navigator.
Now, when you open a notebook, you should see the environment you created in the kernel options.
You are now ready to start using TensorFlow and Keras in your Jupyter Notebook environment!
Be the first to comment