Skip to content

Material for tensorflow presentation for Codeweek Patras 2019

Notifications You must be signed in to change notification settings

kbairak/codeweek_2019

Repository files navigation

Installation

Python

To see if you already have Python installed, open a terminal and type python -V:

➜ python -V
Python 3.7.4

If you don't have Python, you have to install it.

If you are on Linux, use your package manager

➜ sudo apt update -y
➜ sudo apt install python

If you are on Windows or MacOSX, go to https://www.python.org/downloads/

Virtual environments

Virtual environments are a way to isolate the dependencies of a Python project in your machine so that projects don't interfere with each other. When starting a new Python project, it's a good practice to create a new virtual environment and install your dependencies there.

Installation

Recent versions of Python have the venv module which creates virtual environments. To see if it is available to you, type python -m venv:

➜ python -m venv
usage: venv [-h] [--system-site-packages] [--symlinks | --copies] [--clear]
            [--upgrade] [--without-pip] [--prompt PROMPT]
            ENV_DIR [ENV_DIR ...]
venv: error: the following arguments are required: ENV_DIR

If venv is not available to you, then you can install the virtualenv package. If you are on Linux, try using your package manager:

➜ sudo apt install virtualenv

Otherwise, download it as a Python dependency:

➜ sudo pip install virtualenv

Usage

venv and virtualenv work the same way. To create a virtual environment:

➜ python -m venv codeweek_venv

or

➜ vitrualenv codeweek_venv

These commands will create the codeweek_venv folder which will house your virtual environment.

To "enter" (ie activate) your new virtual environment, run:

source codeweek_venv/bin/activate

Now you are "inside" your virtual environment; any packages you install using pip will be installed there and will not "contaminate" the rest of your system.

To "exit" (ie deactivate) your new virtual environment, run:

➜ deactivate

Tensorflow, Jupyter notebook and Matplotplib

While inside your virtual environment, run:

➜ pip install tensorflow jupyter matplotlib

Running

To start a Jupyter server, run:

➜ jupyter notebook

This will create a server process and open a browser tab to the Jupyter dashboard.

Interesting links

And of course:

About

Material for tensorflow presentation for Codeweek Patras 2019

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published