Install keras (tensorflow is the background) and kerastensorflow in Ubuntu

Source: Internet
Author: User
Tags keras

Install keras (tensorflow is the background) and kerastensorflow in Ubuntu

0 System Version Ubuntu16.04

1. system update (the speed is very slow. You can skip this step to see if it will affect subsequent installation)

sudo apt updatesudo apt upgrade 

2. Install python Basic Development Kit

sudo apt install -y python-dev python-pip python-nose gcc g++ git gfortran vim

3. Download Anaconda and install it on the terminal.

./Anaconda.sh

4. Modify terminal python: Enter python in the terminal to start the python version that comes with the system. You can change it to python in Anaconda. Because python starts/usr/bin/python by default, this is a soft link. Delete the original soft link and create a new python pointing to Anaconda.

sudo ln -s ~/anaconda2/bin/python /usr/bin/python

5. Change the environment variables. Edit the environment variables ~ /. Bashrc, add the environment variable (as shown below), and then source ~ /. Bashrc or restart the terminal

export PATH=~/anaconda2/bin/python:$PATH

6. After the changes, you can view the installed modules on the terminal.

conda list

7. Download and decompress pycharm from the official website.

tar -xvf pycharm-community-2017.1.4.tar.gzcd pycharm-community-2017.1.4/bin./pycharm.sh

8. Install tensorflow and keras and Test

sudo pip install tensorflowsudo pip install keraspython -c "import tensorflow"python -c "import keras"

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.