banner



How To Install Keras Using Conda

Keras - Installation


This chapter explains about how to install Keras on your automobile. Before moving to installation, let us become through the bones requirements of Keras.

Prerequisites

You must satisfy the post-obit requirements −

  • Any kind of Bone (Windows, Linux or Mac)
  • Python version 3.5 or higher.

Python

Keras is python based neural network library so python must exist installed on your automobile. If python is properly installed on your machine, and then open your final and type python, y'all could see the response similar as specified beneath,

Python 3.6.five (v3.half-dozen.5:f59c0932b4, Mar 28 2022, 17:00:xviii)  [MSC v.1900 64 fleck (AMD64)] on win32  Blazon "help", "copyright", "credits" or "license" for more information.  >>>        

Equally of at present the latest version is 'iii.7.2'. If Python is not installed, then visit the official python link - www.python.org and download the latest version based on your Os and install it immediately on your organisation.

Keras Installation Steps

Keras installation is quite easy. Follow below steps to properly install Keras on your system.

Step 1: Create virtual environment

Virtualenv is used to manage Python packages for unlike projects. This will be helpful to avoid breaking the packages installed in the other environments. So, information technology is ever recommended to use a virtual environs while developing Python applications.

Linux/Mac Bone

Linux or mac Os users, go to your project root directory and blazon the below command to create virtual environment,

python3 -m venv kerasenv        

After executing the above control, "kerasenv" directory is created with bin,lib and include folders in your installation location.

Windows

Windows user tin apply the below command,

py -m venv keras        

Stride 2: Actuate the surround

This step volition configure python and pip executables in your vanquish path.

Linux/Mac Bone

Now we have created a virtual environment named "kerasvenv". Move to the binder and blazon the beneath command,

$ cd kerasvenv kerasvenv $ source bin/activate        

Windows

Windows users move inside the "kerasenv" folder and blazon the below command,

.\env\Scripts\activate        

Step three: Python libraries

Keras depends on the following python libraries.

  • Numpy
  • Pandas
  • Scikit-learn
  • Matplotlib
  • Scipy
  • Seaborn

Hopefully, you lot take installed all the in a higher place libraries on your system. If these libraries are not installed, then use the below command to install i past one.

numpy

pip install numpy        

you lot could see the following response,

Collecting numpy     Downloading  https://files.pythonhosted.org/packages/cf/a4/d5387a74204542a60ad1baa84cd2d3353c330e59be8cf2d47c0b11d3cde8/     numpy-3.1.1-cp36-cp36m-macosx_10_6_intel. macosx_10_9_intel.macosx_10_9_x86_64.     macosx_10_10_intel.macosx_10_10_x86_64.whl (14.4MB)        |████████████████████████████████| 14.4MB 2.8MB/s        

pandas

pip install pandas        

Nosotros could see the following response,

Collecting pandas     Downloading  https://files.pythonhosted.org/packages/cf/a4/d5387a74204542a60ad1baa84cd2d3353c330e59be8cf2d47c0b11d3cde8/  pandas-3.1.one-cp36-cp36m-macosx_10_6_intel. macosx_10_9_intel.macosx_10_9_x86_64.     macosx_10_10_intel.macosx_10_10_x86_64.whl (14.4MB)        |████████████████████████████████| fourteen.4MB ii.8MB/s        

matplotlib

pip install matplotlib        

We could see the following response,

Collecting matplotlib     Downloading  https://files.pythonhosted.org/packages/cf/a4/d5387a74204542a60ad1baa84cd2d3353c330e59be8cf2d47c0b11d3cde8/  matplotlib-three.one.1-cp36-cp36m-macosx_10_6_intel. macosx_10_9_intel.macosx_10_9_x86_64.     macosx_10_10_intel.macosx_10_10_x86_64.whl (14.4MB)        |████████████████████████████████| 14.4MB 2.8MB/s        

scipy

pip install scipy        

We could see the following response,

Collecting scipy     Downloading  https://files.pythonhosted.org/packages/cf/a4/d5387a74204542a60ad1baa84cd2d3353c330e59be8cf2d47c0b11d3cde8  /scipy-iii.ane.one-cp36-cp36m-macosx_10_6_intel. macosx_10_9_intel.macosx_10_9_x86_64.     macosx_10_10_intel.macosx_10_10_x86_64.whl (14.4MB)        |████████████████████████████████| 14.4MB two.8MB/due south        

scikit-larn

It is an open up source machine learning library. Information technology is used for nomenclature, regression and clustering algorithms. Before moving to the installation, it requires the following −

  • Python version 3.5 or higher
  • NumPy version one.xi.0 or college
  • SciPy version 0.17.0 or college
  • joblib 0.11 or higher.

Now, we install scikit-learn using the below command −

pip install -U scikit-acquire        

Seaborn

Seaborn is an amazing library that allows you to easily visualize your information. Employ the beneath control to install −

pip install seaborn        

You could run into the message like as specified below −

Collecting seaborn     Downloading  https://files.pythonhosted.org/packages/a8/76/220ba4420459d9c4c9c9587c6ce607bf56c25b3d3d2de62056efe482dadc  /seaborn-0.9.0-py3-none-any.whl (208kB) 100%     |████████████████████████████████| 215kB 4.0MB/due south  Requirement already satisfied: numpy> = i.nine.three in  ./lib/python3.7/site-packages (from seaborn) (1.17.0)  Collecting pandas> = 0.xv.ii (from seaborn)     Downloading  https://files.pythonhosted.org/packages/39/b7/441375a152f3f9929ff8bc2915218ff1a063a59d7137ae0546db616749f9/  pandas-0.25.0-cp37-cp37m-macosx_10_9_x86_64. macosx_10_10_x86_64.whl (x.1MB) 100%     |████████████████████████████████| 10.1MB i.8MB/south  Requirement already satisfied: scipy>=0.14.0 in  ./lib/python3.7/site-packages (from seaborn) (one.3.0)  Collecting matplotlib> = i.4.iii (from seaborn)     Downloading  https://files.pythonhosted.org/packages/c3/8b/af9e0984f 5c0df06d3fab0bf396eb09cbf05f8452de4e9502b182f59c33b/  matplotlib-iii.ane.one-cp37-cp37m-macosx_10_6_intel. macosx_10_9_intel.macosx_10_9_x86_64  .macosx_10_10_intel.macosx_10_10_x86_64.whl (14.4MB) 100%     |████████████████████████████████| 14.4MB 1.4MB/southward  ......................................  ......................................  Successfully installed cycler-0.10.0 kiwisolver-1.1.0  matplotlib-3.1.1 pandas-0.25.0 pyparsing-2.4.ii  python-dateutil-2.8.0 pytz-2019.2 seaborn-0.9.0        

Keras Installation Using Python

Every bit of now, we have completed basic requirements for the installtion of Kera. Now, install the Keras using same process as specified below −

pip install keras        

Quit virtual environs

Afterwards finishing all your changes in your project, then but run the below command to quit the environs −

deactivate        

Anaconda Cloud

We believe that you accept installed anaconda cloud on your machine. If anaconda is not installed, then visit the official link, www.anaconda.com/distribution and choose download based on your OS.

Create a new conda environment

Launch anaconda prompt, this will open up base Anaconda environs. Let usa create a new conda environment. This process is similar to virtualenv. Type the beneath command in your conda concluding −

conda create --proper noun PythonCPU        

If you want, you can create and install modules using GPU also. In this tutorial, we follow CPU instructions.

Actuate conda surroundings

To activate the surroundings, apply the below control −

activate PythonCPU        

Install spyder

Spyder is an IDE for executing python applications. Let united states of america install this IDE in our conda surroundings using the below control −

conda install spyder        

Install python libraries

We have already known the python libraries numpy, pandas, etc., needed for keras. You can install all the modules past using the beneath syntax −

Syntax

conda install -c anaconda <module-proper name>        

For example, you lot desire to install pandas −

conda install -c anaconda pandas        

Like the same method, attempt information technology yourself to install the remaining modules.

Install Keras

Now, everything looks skillful so you can start keras installation using the below command −

conda install -c anaconda keras        

Launch spyder

Finally, launch spyder in your conda last using the below command −

spyder        

To ensure everything was installed correctly, import all the modules, it volition add everything and if annihilation went incorrect, you volition go module not institute error message.

Useful Video Courses


Deep Learning &amp; Neural Networks Python Keras

Video

Neural Networks (ANN) using Keras and TensorFlow in Python

Video

Neural Networks (ANN) in R studio using Keras &amp; TensorFlow

Video

CNN for Computer Vision with Keras and TensorFlow in Python

Video

CNN for Computer Vision with Keras and TensorFlow in R

Video

Hands-On Keras for Machine Learning Engineers

Video

Source: https://www.tutorialspoint.com/keras/keras_installation.htm

Posted by: hendersonfachur56.blogspot.com

0 Response to "How To Install Keras Using Conda"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel