最近在pycharm上搭建了几个神经网络的环境,基本都install了matplotlib这个库。但是很奇怪,明明昨天还可以用的环境,今天再用的时候就报错AttributeError

  [解决]import matplotlib.pyplot as plt报错AttributeError: module 'sip' has no attribute 'setapi'

  解决办法

  重新比较了两个运行环境的不同,发现可运行的环境中matplotlib的版本是3.3.0,而有问题的环境的版本是3.3.1,所以尝试降级,成功。

  使用pip安装指定版本的包

  

pip install matplotlib==3.3.0

 

相关文章:

  • 2021-12-05
  • 2022-01-21
  • 2022-01-07
  • 2022-12-23
  • 2021-06-01
  • 2021-04-07
  • 2021-11-21
  • 2021-12-09
猜你喜欢
  • 2022-12-23
  • 2021-06-18
  • 2022-01-07
  • 2021-09-02
  • 2021-12-16
  • 2021-11-25
  • 2022-12-23
相关资源
相似解决方案