首页 > 解决方案 > python:在同一个文件夹中运行两个matplotlib进程

问题描述

我在同一个文件夹中运行多个 python 实例。我正在开发一个交互式集群。我发送了大约 10 个运行和生成图形的批处理matplotlib,我还想运行一个交互式ipython会话(也生成图形)。以交互方式工作时,我收到以下错误,并且我的一个批处理由于相同的消息而失败。我不明白为什么在交互工作时会发生此错误,并且我习惯于发送多个生成图形的进程并且它们彼此不交互。另外,我认为集群本身已经更新,因为现在我正在使用TkAgg后端的批处理作业中生成数字,而这在过去会产生错误和失败。

TimeoutError: LOCKERROR: matplotlib is trying to acquire the lock
    '/<home>/.cache/matplotlib/tex.cache/.matplotlib_lock-*' 
and has failed.  This maybe due to any other process holding this
lock.  If you are sure no other matplotlib process is running try
removing these folders and trying again.

编辑:

matplotlib 版本:2.2.2

标签: pythonmatplotlibpython-3.6cluster-computing

解决方案


推荐阅读