我想使用matplotlib制作一个manelbrot集缩放动画。我使用的是Windows10,我使用的是Python3.7和PyCharm。生成动画的代码工作得非常好,但我无法将实际动画保存在我的计算机上,因为它总是返回[WinError 5],访问被拒绝。我曾尝试以管理员的身份运行PyCharm,但没有成功。下面是代码的样子:
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.animation as animation
plt.rcParams['animation.ffmpeg_path'] = r'C:\Users\User\Desktop'
"""the code that produces the animation"""
mywriter = animation.FFMpegWriter()
animation.save('mymovie.mp4', writer=mywriter)
有没有办法克服这个错误
目前没有回答
相关问题 更多 >
编程相关推荐