operon
operon copied to clipboard
building operon
I am completely new to this, I followed your document step by step and when I did the 'make -j pyoperon' step at the end, I got this error, can you please tell me what is the reason? THANKS a lot!!!
- Build command
mkdir build && cd build cmake .. -G "Visual Studio 15 2017" -A x64 -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_PYBIND=ON -DUSE_OPENLIBM=ON -DUSE_SINGLE_PRECISION=ON -DCERES_TINY_SOLVER=ON make -j pyoperon
Hi, it seems like the pyoperon
target is not generated by CMake. Could you post the whole output of the cmake command?
Hi, it seems like the
pyoperon
target is not generated by CMake. Could you post the whole output of the cmake command?
Thanks for your reply, here is my whole output,what I should do?
Hi,
I think you are missing the Python libraries which are necessary to build the python module. Normally, CMake should find them and display something like this:
-- Found Python3: /nix/store/k3agmx8hndsfd68cal0m9qc9dnbvfq1i-python3-3.9.6-env/bin/python3.9 (found version "3.9.6") found components: Development Interpreter Development.Module Development.Embed
Possibly you need to install Python3 via vcpkg install Python3:x64-windows
or similar. Apologies, this should have been mentioned in the documentation.
Thanks a lot. I tried your suggestion, but vcpkg tells me Python3:x64-windows already exists,
I tried adding my python path to cmake, however the problem still exists
To rule out this cause could you make the following change to the CMakeLists.txt
file and then re-run cmake?
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 27e5746..f2eceb6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,7 +40,7 @@ set_package_properties(doctest PROPERTIES TYPE OPTIONAL) # unit tests
set_package_properties(cxxopts PROPERTIES TYPE OPTIONAL) # command-line parser
# python binding
-set_package_properties(Python3 PROPERTIES TYPE OPTIONAL)
+set_package_properties(Python3 PROPERTIES TYPE REQUIRED)
set_package_properties(pybind11 PROPERTIES TYPE OPTIONAL)
# get revision information from git
This way, if there is a bug in the Python3 port and for some reason CMake can't find it, then it will throw an error.
According to your suggestion, I modified the CMakeLists.txt file, not sure if the changes are correct
the output is as follows(┯_┯)
I made a few more attempts, and this time CMake should find python3
But the problem still exists(┯_┯)
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.