天天看点

Ubuntu development environment configurationSimple steps for Ubuntu development environment

Simple steps for Ubuntu development environment

  • Installing python3 with anaconda
    1. Find

      Anaconda3-4.2.0-Linux-x86_64.sh

      with ctrl+F on the web page
      Ubuntu development environment configurationSimple steps for Ubuntu development environment
    2. Click and wait for download
    3. cd Downloads/

      and then

      bash Anaconda3-4.2.0-Linux-x86_64\(1\).sh

    4. After running the command there are several options to choose. Agree all and follow the instruction by Anaconda. Finally the folder will be on ~/anaconda3
    5. To address the problem of

      conda command not found

      if necessary(Note that anaconda will do this automatically for you. Therefore you can see conda version from another terminal). edit the

      ~/.bashrc

      file by

      sudo gedit ~/.bashrc

      . Put

      export PATH="~/anaconda3/bin:$PATH

      in the end of the file and lastly activate it with

      source ~/.bashrc

    6. Enter

      conda -V

      to see the conda version
  • Install Java
    1. Download jdk from Oracle, make sure that you are picking up the right version to fit the Ubuntu platform and select the file end with .tar.gz
    2. Make a directory for Java under /usr/ with

      sudo mkdir /usr/lib/java

    3. Extract the jdk from /Downloads with

      tar -zxvf jdk-8u171-linux-x64.tar.gz

      . Rename the file and move it to the /usr/lib/java with

      sudo mv jdk /usr/lib/java/

    4. Configure path for Java by editing ~/.bashrc: Enter

      sudo gedit ~/.bashrc

      and then put

      export JAVA_HOME=/usr/lib/java/jdk export JRE_HOME=$JAVA_HOME/jre export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH

    5. source ~/.bashrc

      activate Java
    6. java -version

      to check Java version
  • Install Python3.5 with conda
    1. Create a virtual environment call dev with

      conda create -n dev python=3.5

  • *Install tensorflow
    1. source activate dev

    2. pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.6.0-cp35-cp35m-linux_x86_64.whl