报错提示

今天使用PyCharm下载一个模块pip.exe install locust,有错误提示

1
2
3
4
5
6
7
8
9
10
11
https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
// 报错位置
ERROR: Failed building wheel for psutil

ERROR: Could not build wheels for psutil, which is required to install pyproject.toml-based projects
WARNING: Ignoring invalid distribution -ip (d:\work software\python3.8\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (d:\work software\python3.8\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (d:\work software\python3.8\lib\site-packages)

原因

缺少对应的whl文件

解决办法

碰到了这个错误ERROR: Failed building wheel for psutil,就需要下载psutil.whl

下载网站点击进入网站

下载psutil-5.9.0-cp38-cp38-win_amd64.whl文件

然后使用(pip install 文件的绝对路径)进行安装,然后使用pip.exe install locust正常安装

1
2
3
4
5

pip.exe install D:\Appium\psutil-5.9.0-cp38-cp38-win_amd64.whl

pip.exe install locust