TypeError: use() got an unexpected keyword argument 'warn' when importing matplotlib

后端 未结 1 1081
暖寄归人
暖寄归人 2020-12-10 18:27

I am attempting to learn R markdown / notebook to implement chunks of code which are R and Python. I can use R to a reasonable standard, but I am new to Python. I have downl

相关标签:
1条回答
  • 2020-12-10 19:00

    I had the exact same error when using reticulate and matplotlib.

    I fixed it by downgrading my matplotlib version, e.g.:

    pip install matplotlib==3.2  
    

    You can verify that matplotlib has been downgraded by running pip freeze and finding the matplotlib entry. It should look like matplotlib==3.2.0. (maybe try doing this from r, so you can be sure that you're working with the correct python installation).

    I think this issue is caused by the 'warn' parameter being removed from a matplotlib function in recent versions of matplotlib, and R/reticulate assumes the older behaviour of the function.

    0 讨论(0)
提交回复
热议问题