matplotlib - 模块“sip"没有属性“setapi" [英] matplotlib - module 'sip' has no attribute 'setapi'

查看:57
本文介绍了matplotlib - 模块“sip"没有属性“setapi"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚设置了包含所有 Python 扩展的 VS Code.Python 版本是 3.8.3 通过 Anaconda.解释器是 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:	est.py", line 145, in <module>
    import matplotlib.pyplot as plt

我尝试卸载并重新安装 matplotlib,但无济于事.

I've tried uninstalling and reinstalling matplotlib, but to no avail.

推荐答案

使用 Matplotlib 3.3 版与 IPython 似乎存在不兼容问题.目前,您可以通过安装 Matplotlib 3.2 来修复它.

There seems to be an incompatibility issue using Matplotlib version 3.3 with IPython. For now, you can fix it by installing Matplotlib 3.2.

这篇关于matplotlib - 模块“sip"没有属性“setapi"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆