From a66174d4585be59c2667d3f5b718ab3b8569da74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20=20MENAGER?= <herve.menager@pasteur.fr> Date: Mon, 7 May 2018 13:21:12 +0200 Subject: [PATCH] set matplotlib backend to Agg to avoid useless complaints about missing TkInter Former-commit-id: 28cc2814cdecc8624a779b4cca72f43d62f6ed71 --- ippisite/ippidb/management/commands/pca.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ippisite/ippidb/management/commands/pca.py b/ippisite/ippidb/management/commands/pca.py index ea84a9e6..20fc2c4a 100644 --- a/ippisite/ippidb/management/commands/pca.py +++ b/ippisite/ippidb/management/commands/pca.py @@ -5,8 +5,9 @@ import base64 from django.core.management import BaseCommand, CommandError from django.forms.models import model_to_dict -import pandas as pd import matplotlib.pyplot as plt +matplotlib.use('Agg') +import pandas as pd import numpy as np from sklearn.decomposition import PCA from sklearn.preprocessing import StandardScaler -- GitLab