So do use --user but not if you specified language: python
matrix:
include:
- os: linux
dist: trusty
sudo: required
services:
- docker
language: python
python:
- "3.6"
before_install:
- pip install --user jinja2-cli
script:
- which jinja2
results in:
pip install --user jinja2-cli
Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
The command "pip install --user jinja2-cli" failed and exited with 1 during .
however if you use something else like node:
matrix:
include:
- os: linux
dist: trusty
sudo: required
language: node_js
node_js:
- "8"
before_install:
- pip install --user jinja2-cli
script:
- which jinja2
so use sudo only if you want to break your system python in this ephemeral system that is about to be deleted, don’t use --user with pip if your language is speciffied as python, but feel free elsewhere.
I’m glad this is perfectly clear