Python-Matplotlib / matplotlib.cbook.TimeoutError:LOCKERROR

Анд*_*зин 2 python numpy matplotlib

我在安装模块matplotlib并编写以下代码时遇到了这个问题:

import matplotlib.pyplot as plt
Run Code Online (Sandbox Code Playgroud)

然后是错误:

"matplotlib.cbook.TimeoutError: LOCKERROR: matplotlib is trying to acquire the lock
'C:\\Users\\??????\\.matplotlib\\.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." 
Run Code Online (Sandbox Code Playgroud)

因此,当然,如果不能导入它就不能使用。

小智 5

尝试删除文件夹.matplotlib

对你来说

C:\ Users \ ?????? \。matplotlib

然后导入python模块。