1、镜像站下载代码
-
镜像源:
-
下载代码:
-
pip install numpy==xxx -i Simple Index
https://pypi.tuna.tsinghua.edu.cn/simple
-
2、Python 安装库文件 is not a supported wheel on this platform
-
查看当前系统python版本pip支持类型
-
目的:下载的文件命名格式如果不属于pip支持类型则无法下载
-
步骤:
-
cmd终端输入:python -m pip debug --verbose
-
找到如下:
-
-
-
3、error : subprocess-exited-with-error
-
报错ERROR: Failed building wheel for xxx(某个库),这个报错信息表明缺少了相应的 .whl 文件
-
-
步骤:
-
在以下网站找到需要的whl文件(cp38:python版本是3.8,amd64:电脑window64位,注意:一定要下载自己电脑和Python的对应版本!)
-
4、报错:ModuleNotFoundError
-
一般源于Python找不到你安装的Library,或者说安装的位置不对。以下办法让你直接在Python的文件夹里安装Library,这样Python就能找着了
-
步骤:
-
终端输入cd,进入到python所在文件夹内(例如cd E:\env\py3-qt\Scripts)
-
输入 python -m pip install 库名称
-
5、error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools“
-
安装Microsoft C++ 生成工具 - Visual StudioMicrosoft C++ 生成工具 - Visual Studio
-
目录
2、Python 安装库文件 is not a supported wheel on this platform
3、error : subprocess-exited-with-error
5、error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools“