导入matplotlib时,出现 ModuleNotFoundError: No module named ‘pyparsing’
- 重装一下matplotlib就行
pip uninstall matplotlib
pip install matplotlib -i https://pypi.doubanio.com/simple/
- 如果重装后,在导入matplotlib仍然报错,还可以尝试如下操作:
- 用python -m pip install --upgrade pip更新pip后,卸载matplotlib,然后重装;
- 卸载掉matplotlib,用conda install matplotlib