Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

准备工作


这一章,我们将使用 Python 语言和 ObsPy 软件包 学习并掌握地震学数据的获取、处理和分析。在开始本章内容之前,读者应:

安装依赖包

本章中的地震学实践需要使用如下 Python 包:

通过如下命令安装所需依赖包:

$ conda install obspy cartopy jupyterlab

检查当前环境

开启一个终端,在终端中键入 jupyter lab 命令来启动 JupyterLab。 在 JupyterLab 中新建一个 Notebook,并在 Notebook 中执行如下命令以检查当前环境。

import platform

import obspy
import matplotlib
import numpy
import cartopy

print("Python: ", platform.python_version())
print("ObsPy: ", obspy.__version__)
print("Matplotlib: ", matplotlib.__version__)
print("NumPy: ", numpy.__version__)
print("cartopy: ", cartopy.__version__)