小白教程
所有教程
关于
Search
172.69.58.69
172.69.58.69
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Matplotlib 安装”的源代码
本页内容
上一节:
Matplotlib_教程
下一节:
Matplotlib_Pyplot
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:Matplotlib 安装}}[[Category:Matplotlib 教程|2]] = Matplotlib 安装 = 本章节,我们使用 pip 工具来安装 Matplotlib 库,如果还未安装该工具,可以参考 [https://www.xiaobai.wang/w3cnote/python-pip-install-usage.html Python pip 安装与使用]。 升级 pip: <sample title="" desc="" lang="python" hererun="1"> python3 -m pip install -U pip </sample> 安装 matplotlib 库: <sample title="" desc="" lang="python" hererun="1"> python3 -m pip install -U matplotlib </sample> 安装完成后,我们就可以通过 import 来导入 matplotlib 库: <sample title="" desc="" lang="python" hererun="1"> import matplotlib </sample> 以下实例,我们通过导入 matplotlib 库,然后查看 matplotlib 库的版本号: <sample title="" desc="" lang="python" hererun="1"> import matplotlib print(matplotlib.__version__) </sample> 执行以上代码,输出结果如下: <sample title="" desc="" lang="python" hererun="1"> 3.4.2 </sample>
返回至“
Matplotlib 安装
”。
上一节:
Matplotlib_教程
下一节:
Matplotlib_Pyplot