If you want to use the container based infrastructure you can make use of the apt addon:
addons:
apt:
sources:
- deadsnakes # source required so it finds the package definition below
packages:
- python3.5
Packages that can be used are listed here
Update
In order to use dependencies with c-extensions like psycopg2 or pyYAML it is also necessary to add python3.4-dev