python画图模块plotnine怎么安装
发表于:2026-11-02 作者:千家信息网编辑
千家信息网最后更新 2026年11月02日,本篇内容主要讲解"python画图模块plotnine怎么安装",感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习"python画图模块plotnine怎么安装"
千家信息网最后更新 2026年11月02日python画图模块plotnine怎么安装image.png image.png
本篇内容主要讲解"python画图模块plotnine怎么安装",感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习"python画图模块plotnine怎么安装"吧!
安装
按照官网教程直接使用pip安装
pip install plotnine遇到报错
ERROR: Cannot uninstall 'certifi'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
搜索一番找到说可以在pip命令后加参数--ignore-installed certifi
于是使用命令安装
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple plotnine --ignore-installed certifi
这次安装成功没有报错
python中尝试导入这个模块
from plotnine import *
提示
Bad key animation.mencoder_path in file C:\Users\mingy\AppData\Local\Continuum\anaconda3\lib\site-packages\matplotlib\mpl-data\stylelib\_classic_test.mplstyle, line 509 ('animation.mencoder_path: mencoder')
You probably need to get an updated matplotlibrc file from
https://github.com/matplotlib/matplotlib/blob/v3.3.1/matplotlibrc.template
or from the matplotlib source distribution
搜索了一番,发现有人说可以卸载已经安装的matplotlib然后再重新安装试试 使用pip命令卸载
pip uninstall matplotlib
重新安装命令
python -m pip install -U matplotlib --prefer-binary -i https://pypi.tuna.tsinghua.edu.cn/simple
matplotlib升级到了3.3.1 没有遇到报错 打开python然后再导入plotnine模块
from plotnine import *
这次没有任何提示了
接下来试着运行其中的一个例子
from plotnine import *
from plotnine.data import mtcars
ggplot(mtcars,aes(x='wt',y='mpg',color='factor(gear)'))+geom_point()
ggplot(mtcars,aes(x='wt',y='mpg',color='factor(gear)'))+geom_point()+facet_wrap('~gear',scales="free")
保存为pdf文件
(ggplot(mtcars,aes(x='wt',y='mpg',color='factor(gear)'))+geom_point()+facet_wrap('~gear',scales="free")).save("Desktop/p1.pdf")到此,相信大家对"python画图模块plotnine怎么安装"有了更深的了解,不妨来实际操作一番吧!这里是网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
模块
命令
内容
学习
提示
搜索
实用
更深
成功
接下来
例子
兴趣
参数
实用性
实际
操作简单
教程
文件
方法
更多
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
科技互联网
上海挚品互联网科技有限公司
互联网是第几次科技革命的成果
今日互联网科技
腾讯阿里互联网科技
互联网的科技创新
天下捷融互联网科技
狮子座互联网科技培训
人人互联网科技是培训
海南购全球互联网科技
科技大学互联网专业好不好
互联网时代科技改变生活
福建科技产业互联网发展
互联网科技扶贫时间
互联网金融科技展
徐州市互联网科技有限公司
互联网领先科技宣传片
科技互联网行业投资研究
福仕德教育科技互联网
互联网金融金融科技
互联网科技垄断
易互联网科技有限公司
互联网科技大会
银川新华互联网科技学校地址
青岛科技大学互联网大赛研究生
互联网与医疗科技
互联网公司属于科技吗
长沙渺峰互联网科技有限公司
杭州科技互联网公司有哪些
小牛互联网科技有限公司地址