點擊進入幕布視圖瀏覽 https://mubu.com/doc/a8VGCUfqqw
五、使用pip安裝python第三方庫。
- pip的常用命令
- 方式一:在線安裝
- 1.進入命令行
- 2.敲入pip命令:pip install 包名 。由於python官網下載速度太慢,可以通過添加參數從清華鏡像下載包(-i https://pypi.tuna.tsinghua.edu.cn/simple/)。
- 方式二:離線安裝
- 1.進入清華鏡像https://pypi.tuna.tsinghua.edu.cn/simple/
- 2. ctrl+F 找到需要安裝的包,並下載
- 3. 在下載路徑下打開命令行
- 4. pip install 剛下載的文件名
- 方法三:用Python代碼自動安裝
import os.path as op import os def pipInstall(): libs=['Scikit-Learn','PIL','Requests','Sympy'] for i in libs: try: os.system('pip install '+i+' -i https://pypi.tuna.tsinghua.edu.cn/simple/') print('Successfully installed '+i) except: print('Unsuccessfully installed '+i) pipInstall()