diff --git a/.github/workflows/pnnx.yml b/.github/workflows/pnnx.yml index 28e6540efd0..ac11429636f 100644 --- a/.github/workflows/pnnx.yml +++ b/.github/workflows/pnnx.yml @@ -46,7 +46,7 @@ jobs: run: | cd tools/pnnx mkdir build && cd build - cmake -DCMAKE_BUILD_TYPE=Release .. + cmake -DCMAKE_BUILD_TYPE=Release -DPython3_ROOT_DIR="${{ env.pythonLocation }}" .. cmake --build . -j 4 - name: quick-test diff --git a/tools/pnnx/CMakeLists.txt b/tools/pnnx/CMakeLists.txt index a2f47dfbdea..65b15a3cf52 100644 --- a/tools/pnnx/CMakeLists.txt +++ b/tools/pnnx/CMakeLists.txt @@ -38,8 +38,6 @@ option(PNNX_COVERAGE "build for coverage" OFF) # set(Torch_DIR "${Torch_INSTALL_DIR}/share/cmake/Torch") set(TorchVision_DIR "${TorchVision_INSTALL_DIR}/share/cmake/TorchVision") -set(Python_FIND_REGISTRY "LAST") -set(Python_FIND_FRAMEWORK "LAST") find_package(Python3 COMPONENTS Interpreter Development) PNNXProbeForPyTorchInstall()