pip安pyradiomics时报错 `error: Microsoft Visual C++ 14.0 or greater is required`

pip安装pyradiomic时报错

  [stdout]
  Failed to load config from
  C:\Users\hello\AppData\Local\uv\cache\sdists-v6\pypi\pyradiomics\3.1.0\qK7QjjVAOtjU_ANNUgevR\src\pyproject.toml: 'tool'     
  Try to load it from setup.cfg
  running bdist_wheel
  running build
  running build_py
  Failed to load config from
  C:\Users\hello\AppData\Local\uv\cache\sdists-v6\pypi\pyradiomics\3.1.0\qK7QjjVAOtjU_ANNUgevR\src\pyproject.toml: 'tool'     
  Try to load it from setup.cfg
  Failed to load config from
  C:\Users\hello\AppData\Local\uv\cache\sdists-v6\pypi\pyradiomics\3.1.0\qK7QjjVAOtjU_ANNUgevR\src\pyproject.toml: 'tool'     
  Try to load it from setup.cfg
  copying radiomics\base.py -> build\lib.win-amd64-cpython-313\radiomics
  copying radiomics\featureextractor.py -> build\lib.win-amd64-cpython-313\radiomics
  copying radiomics\firstorder.py -> build\lib.win-amd64-cpython-313\radiomics
  copying radiomics\generalinfo.py -> build\lib.win-amd64-cpython-313\radiomics
  copying radiomics\glcm.py -> build\lib.win-amd64-cpython-313\radiomics
  copying radiomics\gldm.py -> build\lib.win-amd64-cpython-313\radiomics
  copying radiomics\glrlm.py -> build\lib.win-amd64-cpython-313\radiomics
  copying radiomics\glszm.py -> build\lib.win-amd64-cpython-313\radiomics
  copying radiomics\imageoperations.py -> build\lib.win-amd64-cpython-313\radiomics
  copying radiomics\ngtdm.py -> build\lib.win-amd64-cpython-313\radiomics
  copying radiomics\shape.py -> build\lib.win-amd64-cpython-313\radiomics
  copying radiomics\shape2D.py -> build\lib.win-amd64-cpython-313\radiomics
  copying radiomics\__init__.py -> build\lib.win-amd64-cpython-313\radiomics
  copying radiomics\scripts\segment.py -> build\lib.win-amd64-cpython-313\radiomics\scripts
  copying radiomics\scripts\voxel.py -> build\lib.win-amd64-cpython-313\radiomics\scripts
  copying radiomics\scripts\__init__.py -> build\lib.win-amd64-cpython-313\radiomics\scripts
  copying radiomics\schemas\paramSchema.yaml -> build\lib.win-amd64-cpython-313\radiomics\schemas
  copying radiomics\schemas\schemaFuncs.py -> build\lib.win-amd64-cpython-313\radiomics\schemas
  UPDATING build\lib.win-amd64-cpython-313\radiomics/_version.py
  set build\lib.win-amd64-cpython-313\radiomics/_version.py to 'v3.1.0'
  running build_ext
  Failed to load config from
  C:\Users\hello\AppData\Local\uv\cache\sdists-v6\pypi\pyradiomics\3.1.0\qK7QjjVAOtjU_ANNUgevR\src\pyproject.toml: 'tool'     
  Try to load it from setup.cfg
  Failed to load config from
  C:\Users\hello\AppData\Local\uv\cache\sdists-v6\pypi\pyradiomics\3.1.0\qK7QjjVAOtjU_ANNUgevR\src\pyproject.toml: 'tool'     
  Try to load it from setup.cfg
  building 'radiomics._cmatrices' extension

  [stderr]
  C:\Users\hello\AppData\Local\uv\cache\builds-v0\.tmpnxWKhw\Lib\site-packages\setuptools\dist.py:330: InformationOnly:       
  Normalizing 'v3.1.0' to '3.1.0'
    self.metadata.version = self._normalize_version(self.metadata.version)
  C:\Users\hello\AppData\Local\uv\cache\builds-v0\.tmpnxWKhw\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:81:  
  SetuptoolsWarning: `install_requires` overwritten in `pyproject.toml` (dependencies)
    corresp(dist, value, root_dir)
  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/

解决方法

下载一个超大的visual code补全c++库即可

参考