matplotlib-模块'sip'没有属性'setapi' [英] matplotlib - module 'sip' has no attribute 'setapi'
本文介绍了matplotlib-模块'sip'没有属性'setapi'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚设置了带有所有Python扩展的VS Code.通过Anaconda的Python版本是3.8.3.口译员是venv.当我运行这段代码
I just set up the VS Code with all the Python extensions. Python version is 3.8.3 through Anaconda. The interpreter is venv. When I run this code
import matplotlib.pyplot as plt
显示错误-
Exception has occurred: AttributeError
module 'sip' has no attribute 'setapi'
File "C:\test.py", line 145, in <module>
import matplotlib.pyplot as plt
我尝试卸载并重新安装matplotlib,但无济于事.
I've tried uninstalling and reinstalling matplotlib, but to no avail.
推荐答案
这对我有用.
python -m pip install matplotlib==3.2
这篇关于matplotlib-模块'sip'没有属性'setapi'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文