Repository navigation
Open
Description
Hi,
I am facing this error while building on Windows after running the command python setup.py build. Any idea how to go about it?
running build
running build_ext
The system cannot find the file specified
CMake Error: Generator: execution of make failed. Make command was: nmake /nologo &&
Traceback (most recent call last):
File "setup.py", line 49, in <module>
'Topic :: Software Development :: Libraries :: Python Modules',
File "C:\Users\pranav\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\Users\pranav\AppData\Local\Programs\Python\Python37\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\pranav\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\pranav\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\pranav\AppData\Local\Programs\Python\Python37\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\pranav\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\pranav\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "setup.py", line 20, in run
subprocess.check_call(['cmake', '--build', '.'], cwd=build_dir)
File "C:\Users\pranav\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.']' returned non-zero exit status 1.
Metadata
Metadata
Assignees
Labels
No labels
Activity
rithik25 commentedon Jul 21, 2021
I'm facing the same problem too. Were you able to solve this?
GandhiAndy commentedon Sep 8, 2021
Facing this issue on Windows and Arch Linux using Python 3.6. Not too familiar with the CMake process, as why I'm attempting to use the Cython bindings. I will attempt to diagnose the issue, but please let us know if you came across a solution.
yuxiaooye commentedon Nov 25, 2021
I fix this error in the following ways:

1 first run
python setup.py build(facing the same error)2 then delete the folder 'build'
3 run
python setup.py buildthe second timebut I don't know the reason.
IOwenI commentedon Dec 8, 2021
maybe you can check your vs c++, reinstall it and try again
IOwenI commentedon Dec 11, 2021
请问你是使用windows完成的吗?我感觉你的截图和我用windows区别有点大,如果你是用Windows完成的方便指导一下我吗,这是我的联系方式1024883943@qq.com,不胜感激!
davi-v commentedon Feb 7, 2022
I had the same problem. Here are the steps I took that worked: I used CMake 3.22.2 and Visual Studio 2022. Then I used CMake-GUI to configure the input folder to the root folder (with CMakeLists.txt), the output folder the build folder. It then generated Visual Studio 2022 projects. Then open the solution file (.sln) in the build folder, select Release, build everything. For some (weird) reason the output library RVO.lib is in build/src/Release/RVO.lib. Then manually copy RVO.lib to the root folder (where setup.py and CMakeLists.txt) is located. Then execute the python commands to build and install.
HzcIrving commentedon Jul 2, 2022
Hi, I also have a similar issue with Windows 11.

When I carry out
python setup.py build, I got the following error:I wonder if anyone could help me. Thank you very much!
adhocmaster commentedon Aug 27, 2022
This solution works
aegiraldob commentedon Oct 27, 2022
@davi-v Hi, could you please re explain the part when you configure the input folder to the root folder and the output folder the build folder please. It is not clear for me what you did and so far this is the only solution that someone has provided
davi-v commentedon Oct 28, 2022
@aegiraldob Ok. So here's a more detailed step by step:
https://github.com/Kitware/CMake/releases/download/v3.25.0-rc2/cmake-3.25.0-rc2-windows-x86_64.zip, unpack it, you know the drill.https://github.com/sybrenstuvel/Python-RVO2/archive/refs/heads/main.zipC:\Users\User\Downloads\Python-RVO2-main\CMakeLists.txt. What I meant by root folder, isC:\Users\User\Downloads\Python-RVO2-main.C:\Users\User\Downloads\Python-RVO2-main). In "Where to build the binaries:", put something likeC:/Users/User/Downloads/Python-RVO2-main/mybuild, which will automatically create themybuilddirectory.mybuilddirectory, choose "Visual Studio 17 2022", "Use default native compilers" (in my case, it was already defaulted to that).mybuilddirectory, clickRVO.slnReleaseon the top (it will beDebugthere probably).Ctrl+Shift+B, or right clicking theSolution 'RVO' (13 of 13 projects)-> Build SolutionRVO.libwill be located inmybuild\src\Release(or simply Ctrl+F for it). Manually copy it to the root folderpip install -r requirements.txt,pip install Cython,python setup.py build,python setup.py install.