Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

python-3.x - ValueError:无法识别的后端字符串'gtkagg':有效字符串为['GTK3Agg',(ValueError: Unrecognized backend string 'gtkagg': valid strings are ['GTK3Agg',)

import matplotlib 
matplotlib.use('GTKAgg')    
import matplotlib.pyplot as plt 
import numpy as np 
from sklearn import datasets, linear_model 
import pandas as pd 
ValueError: Unrecognized backend string 'gtkagg': valid strings are ['GTK3Agg', 'GTK3Cairo', 'MacOSX', 'nbAgg', 'Qt4Agg', 'Qt4Cairo', 'Qt5Agg', 'Qt5Cairo', 'TkAgg', 'TkCairo', 'WebAgg', 'WX', 'WXAgg', 'WXCairo', 'agg', 'cairo', 'pdf', 'pgf', 'ps', 'svg', 'template'] 

在此处输入图片说明

  ask by Zaheer Ahmad translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The backend you specified does not exist on your machine.

(您指定的后端在您的计算机上不存在。)

You can use one of the backends suggested in error message like GTK3Agg .

(您可以使用错误消息中建议的后端之一,例如GTK3Agg 。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...