Skip to content

Permission denied: '/root/.cache/matplotlib/fontlist-v330.json.matplotlib-lock #1289

Closed Answered by rodrigo-pedro
rodrigo-pedro asked this question in Q&A
Discussion options

You must be logged in to vote

Ok i managed to fix this. Since I already have /tmp mounted in fs.mount, I changed the cache folder for matplotlib to a folder in /tmp with the following line:

os.environ['MPLCONFIGDIR'] = '/tmp/.cache'

Make sure to add this line before importing the library that is causing the issue.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rodrigo-pedro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant