Set up Python3 dev environment Ubuntu

Set up Python3 dev environment Ubuntu

Here is a script that I've used to set up a python environment on Ubuntu and raspbian


    #Update the system
    sudo apt-get update 
    sudo apt-get -y upgrade

    #Install python and virtualenv
    sudo apt-get install build-essential libssl-dev libffi-dev python-dev python3-tk python3-venv python3-pip

    #Create env directory tree
    mkdir environments
    cd environments
    pyvenv my_env
    source my_env/bin/activate  

    Output
    >>> (my_env) user@host:~/path/to/env

    #Install useful libraries
    pip3 install numpy
    pip3 install scipy
    pip3 install sklearn
    pip3 install tensorflow