install keras with TensorFlow backend
As i am working on windows and familiar with it, i will explain how to install keras with TensorFlow cpu.
- Install anaconda by downloading(just clicking next, next...install).
- Open anaconda prompt and type following command to create an environment and activate it.(keras is the environment name of mine)
>>conda create --name keras
- It will prompt for yes or no : type yes.
- For activating the Environment,Type following:
>>conda activate keras
- Follow the link in-case you got struck somewhere: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment
- If you reopen the anaconda prompt after closing, it will open with it's default base environment. So to change the environment use activate command as above
- If needed check these:
(keras) C:\Users\saicharan>conda info active environment : keras active env location : E:\anaconda3\envs\keras shell level : 2 user config file : C:\Users\saicharan\.condarc populated config files : conda version : 4.6.11 conda-build version : 3.17.8 python version : 3.7.3.final.0 base environment : E:\anaconda3 (writable) channel URLs : https://repo.anaconda.com/pkgs/main/win-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/free/win-64 https://repo.anaconda.com/pkgs/free/noarch https://repo.anaconda.com/pkgs/r/win-64 https://repo.anaconda.com/pkgs/r/noarch https://repo.anaconda.com/pkgs/msys2/win-64 https://repo.anaconda.com/pkgs/msys2/noarch package cache : E:\anaconda3\pkgs C:\Users\saicharan\.conda\pkgs C:\Users\saicharan\AppData\Local\conda\conda\pkgs envs directories : E:\anaconda3\envs C:\Users\saicharan\.conda\envs C:\Users\saicharan\AppData\Local\conda\conda\envs platform : win-64 user-agent : conda/4.6.11 requests/2.21.0 CPython/3.7.3 Windows/10 Windows/10.0.17763 administrator : False netrc file : None offline mode : False (keras) C:\Users\saicharan>conda env list WARNING: The conda.compat module is deprecated and will be removed in a future release. WARNING: The conda.compat module is deprecated and will be removed in a future release. # conda environments: # base E:\anaconda3 keras * E:\anaconda3\envs\keras
- Now install the TensorFlow using the command:
>>pip install --upgrade tensorflow
- If needed check the installation page of tensorFlow : https://www.tensorflow.org/install/pip?lang=python3
- Now Install Keras using following command :
>>conda install -c conda-forge keras
- If needed check the installation page of Keras in anaconda : https://anaconda.org/conda-forge/keras
- With this step installation is complete. Type a sample code and check it out.
- For installing google API python client use the following command:
>>conda install -c conda-forge google-api-python-client
Open your IDE in this environment by creating a project and enjoy...
Comments
Post a Comment