Slicer build up fail

I was trying to build up Slicer by using source code from github.

I followed the instructions from here: Windows — 3D Slicer documentation

I also checked with the Install Prerequisites

Cmake: cmake version 3.28.6

Git: git version 2.50.1.windows.1

Qt5: 5.12.2

Visual Studio: Desktop development with C++ (checked), MSVC v143 - VS 2022 C++ x64/x86 build tools (checked), Windows 11 SDK (checked)

I created two folders, D:\D\S and D:\D\SR

I am using D:\D\SR as <Slicer_BUILD>

I use CMake (cmake-gui) to configure and build Slicer. I follow every step from the website.

I opened Visual Studio, switched to Release mode, right-clicked on ALL_BUILD, and selected Build. After several hours, the build failed. And the error messages are shown below

I navigate to D:\D\SR\python-install\bin and type the command

 ./python.exe -m pip install --upgrade setuptools wheel
Muen@MUEN MINGW64 /d/D/SR/python-install/bin
$ ./python.exe -m pip show setuptools
Name: setuptools
Version: 80.9.0
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Home-page:
Author:
Author-email: Python Packaging Authority <distutils-sig@python.org>
License-Expression: MIT
Location: D:\D\SR\python-install\Lib\site-packages
Requires:
Required-by:

I’ve checked the setuptools version is above 42 (mine is 80.9.0). I went back to Visual Studio and right clicked “SimpleSTK” and selected “Build” again.

But the errors remain.

Could someone please give me some suggestions? Thanks

Slicer does not require or use any existing Python installations. If you installed any Python distributions from python.org it should not cause any problems. However, Anaconda Python distributions tend to be really invasive, arbitrarily changing system-level Python settings, which can cause problems in all other Python installations, including Slicer’s.

You can look into the logs to see any Python installation mentioned in the logs (in D:\D\SR\Testing\Temporary folder) that is outside the Slicer build tree then delete (or temporarily rename its parent folder so it is not found) and restart the build. Maybe you need to restart the build from scratch.

Hi Mr. Lasso, thank you for your reply. I’ve checked the folder

D:\D\SR\Testing\Temporary

Unfortunately, there is no file in this folder.

Some articles also mentioned Python might be a big problem while compiling. As a result, I’ve removed Python path from my environmental variables. Currently I am rebuilding Slicer with Slicer_USE_PYTHONQT_WITH_OPENSSL checked and unchecked (from CMake). Hope this time I can build up Slicer successfully.

Like I mentioned above, I restarted the build from scratch. Unfortunately, I still got the errors.

The errors with Slicer_USE_PYTHONQT_WITH_OPENSSL checked, and no python path in environmental variables

The errors with Slicer_USE_PYTHONQT_WITH_OPENSSL unchecked, and no python path in environmental variables

Seems Slicer_USE_PYTHONQT_WITH_OPENSSL must be checked during build up.

My Python was downloaded from python.org, not from Anaconda. I have Anaconda in my PC, but the path is not in the environmental variables.

After the build, I still cannot see any log from D:\D\SR\Testing\Temporary.

In the Visual Studio console, I saw the log shows

5>-- Using src=‘``https://www.python.org/ftp/python/3.12.10/Python-3.12.10.tgz’

I think during the build, Slicer is using its own Python. But I still don’t know how to solve this problem.

Any suggestion would be appreciated, thanks!