安装obspy后python解释器找不到matplotlib

问题描述

  • 安装obspy之前使用pip安装了matplotlib 【使用anaconda安装环境】
pip install matplotlib
  • 使用conda安装了obspy
activate py3
conda install obspy -c conda-forge
  • 随后在import obspy时,报错ModuleNotFoundError: No module named 'matplotlib'

最终解决办法

1、更新pip。以win10为例,打开DOS界面,输入如下更新pip的命令。

activate py3
python -m pip install --upgrade pip

2、由于我们使用的是python3.7,使用pip安装matplotlib,python解释器还是找不到matplotlib,最后发现需要使用pip3安装。

pip3 install matplotlib

你可能感兴趣的:(安装obspy后python解释器找不到matplotlib)