python-3.x - matplotlib - 模块“sip”没有属性“setapi”
问题描述
我刚刚使用所有 Python 扩展设置了 VS Code。通过 Anaconda 的 Python 版本是 3.8.3。解释器是 venv。当我运行这段代码
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,但无济于事。
解决方案
这对我有用。
python -m pip install matplotlib==3.2
推荐阅读
- ios - willDisplay 单元格中的函数也在视图加载时调用
- c# - Bot Framework V4 Azure AD 身份验证返回错误请求
- react-native - 如何在 FlatList extraData 中传递多个对象或值
- appium-android - 如何在appium-android中长按元素?
- javascript - date.split() 不是函数
- import - 字符串和 Ascii 的 Coq 导入问题
- selenium - 将 Selenium WebDriver 连接到 JPanel 中嵌入的 SWT 浏览器
- c# - 如何避免嵌套使用?
- power-automate - Microsoft Flow:如何将 Flow 操作的一个字段中的值用于另一个字段进行操作
- powershell - 在 Office 365 中创建新的共享邮箱