程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

General solutions to errors in Python installation of third-party libraries

編輯:Python

adopt pip install xxx Errors can be roughly divided into the following categories

  1. The Internet speed is not good

    terms of settlement :

    The domestic image method is pip install xxx ( Package name ) -i( Image URL )
    Common images are :

     douban -i https://pypi.douban.com/simple/
    Ali -i https://mirrors.aliyun.com/pypi/simple/
    Huazhong University of technology -i https://pypi.hustunique.com/simple/
    Shandong University of technology -i https://pypi.sdutlinux.org/simple/
    University of science and technology of China -i https://pypi.mirrors.ustc.edu.cn/simple/
    tsinghua -i https://pypi.tuna.tsinghua.edu.cn/simple
    
  2. It can be downloaded normally but cannot be installed , Such as

    terms of settlement , To find the corresponding wheel file
    website :https://www.lfd.uci.edu/~gohlke/pythonlibs/
    ctrl+f Search the package name corresponding to the element
    Click on the corresponding package
    0.1.15 Refers to the version of the Library ,cp37 Is applicable to python3.7,win32 It refers to the corresponding system , If you are linux System , Then go find the corresponding linux package .
    And then use it cmd Command line cd To the downloaded directory , use pip Tools for installation , Such as :
    pip install pocketsphinx-0.1.15-cp37-cp37m-win_amd64.whl( Press tab Key will automatically complete the package name )

  3. It can be downloaded but the prompt version is incorrect

    terms of settlement :
    pip install xxx( Package name )==xx.xx( edition )

  4. Able to download , But wrong reporting

     Microsoft Visual C++ 14.0 or greater is required.
    Get it with "Microsoft C++ Build Tools":
    

    Generally, the downloaded package is .tar.gz The file of , instead of .whl file , First, you need to decompress it , Then compile , then set.up The tool will install it .
    This error usually occurs in win System , Because the corresponding... Is missing during compilation C++ Compilation tool failed to compile .
    terms of settlement : Let's see if we can find the corresponding wheel file ,wheel A file is a compiled file , It can be installed directly .
    If the corresponding file cannot be found , Then download the corresponding C++ Compiler tools ,
    Look at this blog : Portal


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved