使用pip安裝python模塊和包


點擊進入幕布視圖瀏覽 https://mubu.com/doc/a8VGCUfqqw

五、使用pip安裝python第三方庫。

  • pip的常用命令
  • 方式一:在線安裝
  • 方式二:離線安裝
  • 方法三:用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()

     

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM