When developing in Python, it is always a good practice to create a virtual environment to develop a new project. This way, your dependencies versions will not conflict with other tools/projects that you are using/working on.
We highly recommand to use pyenv to manage your virtual environments. There is a utility to install it automatically here. If you are comfortable with other tools to install python packages and virtual environment tools, feel free to use them.
In this section, we will describe we will describe you how to install pyenv and the packages needed to follow the tutorial.
# Install pyenv and pyenv-virtualenv
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
# Make pyenv and virtualenv effective in your current bash
export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
# Make pyenv and virtualenv effective your future bash
echo 'export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc# Install pyenv and pyenv-virtualenv
brew install pyenv pyenv-virtualenv
# Make pyenv and virtualenv effective in your current bash
export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
# Make pyenv and virtualenv effective your future bash
echo 'export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"' >> ~/.bashrcHere the steps are the same for MacOS or Linux.
# Install the good python version
pyenv install 3.6.5
# Create an environment for following the tutorial
pyenv virtualenv 3.6.5 noos-python-tutorial
# Activate the environment, the only command you need to remember
# for the next time
pyenv activate noos-python-tutorial
pip install --upgrade pip
# To reach the platform
pip install requests
# Only to print the results
pip install opencv-python