注:本文利用anaconda來進行包的安裝和升級
以下以pyecharts為例
1、常見的安裝包的方式(anaconda prompt)
(1)直接安裝:
conda install pyecharts
conda install -c conda-forge pyecharts
pip install pyecharts
(如果需要安裝特定版本在后面添加版本即可,如pip install pyecharts==0.1.9.4)
(2)通過鏡像安裝:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyecharts
清華源:https://pypi.tuna.tsinghua.edu.cn/simple
豆瓣源:https://pypi.doubanio.com/simple/
阿里雲:http://mirrors.aliyun.com/pypi/simple/
中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/
華中理工大學:http://pypi.hustunique.com/
山東理工大學:http://pypi.sdutlinux.org/
(3)通過whl文件安裝(前提需要先將whl安裝文件放到指定目錄下面)
pip install D:\Download\anaconda3\Scripts\pyecharts-0.1.9.4-py2.py3-none-any.whl
或者cd先切換到根目錄,再切換D盤:D:,在安裝目錄安裝:pip install pyecharts-0.1.9.4-py2.py3-none-any.whl
whl文件下載網址:https://www.lfd.uci.edu/~gohlke/pythonlibs/
2、安裝包升級
pip install -U pyecharts
pip install --upgrade numpy
conda update pyecharts