致命的Python错误:已跟踪GC对象

致命的Python错误:已跟踪GC对象,python,matplotlib,thread-safety,Python,Matplotlib,Thread Safety,我使用matplotlib创建一些图表,使用AGG后端 import matplotlib matplotlib.use('AGG') import matplotlib.plot as plt # ... def chart_view(request): fig = plt.figure # Do stuff with fig and finally save it in a Django HttpResponse # object and return the H

我使用matplotlib创建一些图表,使用
AGG
后端

import matplotlib
matplotlib.use('AGG')
import matplotlib.plot as plt

# ...

def chart_view(request):
    fig = plt.figure
    # Do stuff with fig and finally save it in a Django HttpResponse
    # object and return the HttpResponse object.
现在我有了一个有三个图像的网页,所有三个图像都导致运行
chart\u view
。通常只有一个映像成功,Django开发服务器会以“致命的Python错误:GC对象已被跟踪”停止。我不确定问题出在
matplotlib
中,可能出在
pandas


如何调试这个问题?

好的,当我使用Debian Jessie的matplotlib 1.4.2和最新的pandas(0.17.0)结合使用时,我发现它正在调试,我已经安装了
pip install--upgrade--no-deps pandas
(在使用
--系统站点包的VirtualEnvironment中)。如果我使用Debian的pandas 0.14.1,一切都很好。想想这是为什么。无论如何,我打算使用Debian的软件包,这样就解决了我的问题