问题描述
我正在尝试学习表,并在将数据科学库导入为:
let moveAction = SKAction.move(to: CGPoint(x: origNP.x,y: origNP.y),duration: 1.0)
obstacle.run(moveAction)
或通过
from datascience import *
我说错了
TypeError:use()获得了意外的关键字参数'warn'
我在模块中收到此错误: matplotlib.use()
除该导入行外,我没有任何其他代码。 我正在使用python版本3.8.5和pip版本20.2.1。我通过以下方式安装了整个数据科学库:
pip安装数据科学
在本主题中,我仅找到this解决方案,但是尝试该错误仍然存在。发生了什么事?
解决方法
以前从未使用过该库,但我确实查看了文档(https://matplotlib.org/3.2.1/api/matplotlib_configuration_api.html#matplotlib.use)
在我看来,您正在传递不推荐使用的参数(警告)
尝试一下:
matplotlib.use(backend,force=True)
编辑: 上述解决方案对我不起作用。 如@JustCarlos所述,我通过删除两个文件 tables.py 和 util.py 。但是我不确定此删除操作是否会影响该库的其他使用。