出现报错:
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": 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 pybullet Running setup.py clean for pybullet Failed to build pybullet
ERROR: Could not build wheels for pybullet, which is required to install pyproject.toml-based projects
出现问题的原因是因为本机中无Microsoft Visual C++ Build Tools和对应的wheel?
解决:
第一种方法:下载VS
第二种方法:直接下载对应的whl文件(推荐,但是可能会出现其他包不存在等)
第三种方法:直接下载Microsoft Visual C++ Build Tools(推荐)
笔者这里之前安装过VS2019,但不知道为什么还是检查不出Microsoft Visual C++ Build Tools,重新安装VS2022还是不行。
在经过大量搜索之后,本来想直接安装pybullet对应的whl文件,下面是两个网址:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pymssql
注意这里下载的whl文件要对应自己本机的设置,具体版本如何查看可以CSDN一下 ~或者查看文末链接。
但是笔者并没有找到win版本的pybullet对应的whl文件,所以在下面贴的链接中直接下载了Microsoft Visual C++ Build Tools,再用下面的conda-forge才能安装。pip不知道为什么也安装不上。
很多报上面错误的包如果按照下文的方法不能解决,请尝试:
conda install -c conda-forge 包名称
参考于
【精选】Microsoft Visual C++ 14.0 is required._哈哈哈,冲冲冲的博客-CSDN博客
如何下载安装whl轮子以及确定Python适配版本_pyproj-3.0.1-cp38-cp38-win_amd64库下载-CSDN博客