一、安装pyecharts
可以通过win + R
输入 cmd
,回车即可打开cmd
控制台,在cmd
中使用pip
命令安装pyecharts库,如下所示:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ pyecharts
其中-i https://pypi.tuna.tsinghua.edu.cn/simple/
是使用清华镜像作为下载源,可以极大提高下载速度。
如果已经安装了anaconda
,可以在cmd
控制台使用下面的命令启动 jupyter notebook
# 输入命令
C:\Users\xyz> jupyter notebook
# 输出下面的内容表示启动成功
[I 17:39:17.867 NotebookApp] JupyterLab extension loaded from E:\anaconda3\lib\site-packages\jupyterlab
[I 17:39:17.867 NotebookApp] JupyterLab application directory is E:\anaconda3\share\jupyter\lab
[I 17:39:17.870 NotebookApp] Serving notebooks from local directory: E:/data/jupyter
[I 17:39:17.870 NotebookApp] The Jupyter Notebook is running at:
[I 17:39:17.871 NotebookApp] http://localhost:8889/?token=f8f6460fc9857369b94d333f21ecff01cbcc1ee9b4577400
[I 17:39:17.871 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 17:39:18.156 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8889/?token=f8f6460fc9857369b94d333f21ecff01cbcc1ee9b4577400
[I 17:39:18.541 NotebookApp] Accepting one-time-token-authenticated connection from ::1
image.png
image.png
二、查看pyecharts的版本号
import pyecharts
pyecharts.__version__
'1.7.0'

参考文章:
Pyecharts ——(一)bar
Python—pyecharts(柱状图)
基于Jupyter下的Pyecharts下的可视化编程
【pyecharts教程】应该是全网最全的教程了
网友评论