当我安装模块matplotlib并编写以下代码时,我遇到了这个问题:
import matplotlib.pyplot as plt然后是错误:
"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." 所以当然,如果它不能被导入,它就不能被使用。
发布于 2018-05-23 19:15:30
尝试删除文件夹.matplotlib
对你来说,它是在
C:\Users\Андрей.matplotlib
然后导入python模块。
发布于 2020-01-22 19:31:16
在Linux上,上面的答案也适用,但是要删除的文件夹在/home/user/.cache/matplotlib下。
发布于 2020-09-11 01:43:46
确保您确实安装了LaTex (根据您的操作系统,有许多不同的安装方法)。首先,试着擦除前后的$符号(从'$ axes给定名称$‘改为'axes给定名称’)。如果不起作用,只需删除该文件(不是.text),然后重新运行整个过程。但请确保您重新加载了初始命令,如"import numpy as np“、"import matplotlib.pyplot as plt”,如果您正在进行3D绘图,请使用"from mpl_toolkits.mplot3d.axes3d import Axes3D“。如果您的PC/笔记本电脑上已经安装了LaTex,请重新安装并重新安装。它应该对你有帮助
https://stackoverflow.com/questions/50141983
复制相似问题