Hi!
Since our last discussion, and before to make any modification in the widget, I tried to build a clean vtk from scratch. After quite a lot of tries I think I am close to the end… but need your help for the last step
Here is what I did so far (for information I’m working from a fresh AWS EC2 virtual machine under windows), my objective is to build a python wheel:
- Install git
- Install Visual Studio Community (Desktop development with C++)
- Install Python 3.8 (and install wheel with pip)
- Install CMake
Then:
- Download vtk sources from github
- Launch a command line “x64 native tools command prompt”
- From this command line launch cmake-gui
- In cmake-gui, setup the source and build folders and then “Configure” and modify those options:
CMAKE_CONFIGURATION_TYPE : Release
VTK_WRAP_PYTHON : true
VTK_WHEEL_BUILD : true
- Then “Generate” and after all ok “Open Project”
- Then under Visual Studio, right click on ALL_BUILD and after a lonnng time I have a “382 succeede, 0 failed”
But then I tried to build a python wheel with the command “python setup.py bdist_wheel” and after a while here is my error:
running build_ext
Microsoft (R) Build Engine version 17.1.0+ae57d105c for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(437,5): er
ror MSB8013: This project doesn't contain the Configuration and Platform combination of Debug|x64. [C:\vtk\build\ZERO_C
HECK.vcxproj]
Traceback (most recent call last):
File "setup.py", line 139, in <module>
setup(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\wheel\bdist_wheel.py", line 299, in run
self.run_command('build')
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\setuptools\command\build_ext.py", line 79, in run
_build_ext.run(self)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\distutils\command\build_ext.py", line 340, in run
self.build_extensions()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\distutils\command\build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "setup.py", line 37, in build_extension
subprocess.check_call([CMAKE_EXE, '--build', BUILD_DIR, '--target', ext.target],
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Program Files\\CMake\\bin\\cmake.EXE', '--build', 'C:\\vtk\\build', '--target', 'vtkCommonCorePython']' returned non-zero exit status 1.
So far I didn’t manage to go further… That’s why I am calling for your help
But maybe I don’t have to do so much, as I just want to modify the cameraorientationwidget isn’t there a way to build only this file and replace it directly under my python vtk installation?
Thanks in advance for your help, sorry for the long message