Python Matplotlib errors with savefig (newbie).

后端 未结 3 593
小蘑菇
小蘑菇 2021-01-28 18:15

All parts of Python on my computer were recently installed from the Enthought academic package, but use Pyscripter for editing and running code. I\'m very early in my learning

3条回答
  •  忘了有多久
    2021-01-28 18:29

    There's nothing wrong with your code. I just tested it locally on my machine. The issue is this error:

    IOError: [Errno 13] Permission denied: 'TestHist.png'
    

    You are most likely trying to save the file somewhere that the Python process doesn't have permission to access. What OS are you on? Where are you trying to save the file?

提交回复
热议问题