# JJU_干干
1. 在Jupyter中安裝第三方庫和在本地安裝類似,區別在於,Jupyter要在開頭加一個感嘆號。
!pip install 某包
2. 但這樣往往下載較慢或者出現錯誤(以 lightgbm 為例):
因此我們需要切換國內的鏡像源更快速方便的下載,類似於本地切換鏡像源類似,也是開頭多加一個感嘆號。
以安裝 lightgbm,切換清華源為例:
代碼例子:
! pip install lightgbm -i https://pypi.tuna.tsinghua.edu.cn/simple
代碼形式:
! pip install 某包 -i 某鏡像源
國內常用的鏡像源:
清華大學: https://pypi.tuna.tsinghua.edu.cn/simple/
阿里雲: https://mirrors.aliyun.com/pypi/simple/
中國科技大學: https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣: http://pypi.douban.com/simple/
中國科學技術大學: http://pypi.mirrors.ustc.edu.cn/simple/
華中理工大學:http://pypi.hustunique.com/simple/
山東理工大學:http://pypi.sdutlinux.org/simple/