无法在pip上运行MSBuild命令



我正在Python中安装scikit生存包。当我运行时

pip install scikit-survival 

我在msbuild上得到了一个错误,我在下面附上了感兴趣的元素:


PS C:WINDOWSsystem32>pip install scikit-survival     

..
Building wheels for collected packages: qdldl                                                                             
Building wheel for qdldl (setup.py) ... error                                                                           
error: subprocess-exited-with-error                                                                                                                                                                                                             
× python setup.py bdist_wheel did not run successfully.                                                                 
│ exit code: 1                                                                                                          
╰─>[24 lines of output]                                                                                                    
running bdist_wheel                                                                                                     
running build                                                                                                           
running build_ext                                                                                                       
-- Selecting Windows SDK version  to target Windows 10.0.22000.                                                         
CMake Error at CMakeLists.txt:4 (project):                                                                                
Failed to run MSBuild command:                                                                                                                                                                                                                    
MSBuild.exe                                                                                                                                                                                                                                   
to get the value of VCTargetsPath:                                                                                                                                                                                                                
Impossibile trovare il file specification                                                                                                                                                                                                                                                                                                                                                                                                                                                     
-- Configuring incomplete, errors occurred!                                                                             
See also "C:/Users/xyz/AppData/Local/Temp/pip-install-
uyja9anj/qdldl_c05b02902dbe43b69e2860ddcf14a11a/c/build/CMakeFiles/CMak
eOutput.log".                                                                                                  
Impossibile trovare il file specification                                                                                 
CMake Error: Generator: execution of make failed. Make command was: 
MSBuild.exe qdldlamd.vcxproj /p:Configuration=Release /p:Platform=x64 
/p:VisualStudioVersion=14.0 /v:m &&                                                                   
building 'qdldl' extension                                                                                              
cl : warning della riga di comando D9002 : l'opzione sconosciuta '-
std=c++11' verr… ignorata                            qdldl.cpp                                                                                                               
cqdldl/include/qdldl.h(5): fatal error C1083: Non Š possibile aprire 
il file inclusione: 'qdldl_types.h': No such file or directory                                                                                                            
error: command 'C:\Program Files (x86)\Microsoft Visual 
Studio\2022\BuildTools\VC\Tools\MSVC\14.30.30705\bin\HostX86\x
64\cl.exe' failed with exit code 2                                                                            
[end of output]                                                                                                                                                                                                                             
...                

The issue is with MSbuild.exe. Do you know how it can be solved? I have installed both Visual Studio Community with Python extensions and Visual Studio Build Tools.

try:

pip install pipwin
pipwin install <package>

您似乎使用了错误的VisualStudio版本。如Make命令错误VisualStudioVersion应为14.0(即Visual Studio 2015(中所述,您的Visual Studio版本为2022(VisualStudioVersion=22.X(。

CMake和不同的VS版本以及不同的SDK有点令人困惑。

是什么帮助了我:

在Visual Studio安装程序中,如本文顶部注释中所述,修改您的Visual Studio安装。(使用C++进行桌面开发>可选>MSVC v140-VS 2015,应位于列表底部(

如果你在运行另一个错误(发生在我身上(,你可能必须安装Windows SDK 8.1

可能有一种方法可以更改CMake的Visual Studio版本,因为上面的步骤帮助了我,我还没有考虑过其他解决方案。

请告诉我这是否有帮助,或者是否有其他问题。

干杯。

相关内容

  • 没有找到相关文章

最新更新