Build with Python #9462
-
I am trying to build EnergyPlus with Python on Windows using Visual Studio 2019 Community. The EnergyPlus version is v22.1.0. Basically, I can build it and run some tests idf successfully. However, I need to use python Plugin in my simulations and I am keeping get an error " this build of EnergyPlus is not compiled with Python" although I have already turned the option in CMAKELIST.txt on. So I wonder if there is anything I missed? Any help will be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
It would be helpful for you to put some more of your build process and output. When you say you turned on the option in CMakeLists.txt, does that mean you actually edited the CMakeLists.txt file itself prior to trying to build?? If so, you have already gone down the wrong path. You should use either the CMake-Gui, the curses-based ccmake tool, or pass build options to the base cmake executable file. I have not had any luck using Visual Studio's built-in CMake support, so our build instructions still indicate you should generate the visual studio solution from outside visual studio, and then do your editing in VS like normal. If you turned on LINK_WITH_PYTHON in your cmake configuration, then the resulting EXE should definitely include a link to the python library, unless there was some error message along the way. (In which case the build should have failed anyway) |
Beta Was this translation helpful? Give feedback.
It would be helpful for you to put some more of your build process and output.
When you say you turned on the option in CMakeLists.txt, does that mean you actually edited the CMakeLists.txt file itself prior to trying to build?? If so, you have already gone down the wrong path. You should use either the CMake-Gui, the curses-based ccmake tool, or pass build options to the base cmake executable file. I have not had any luck using Visual Studio's built-in CMake support, so our build instructions still indicate you should generate the visual studio solution from outside visual studio, and then do your editing in VS like normal.
If you turned on LINK_WITH_PYTHON in your cmake configuration, t…