Building python from source for MSI installer - Python Help - Discussions on Python.org
Building python from source for MSI installer Python Help pnthai88 (Thai N Pham) July 9, 2024, 2:23pm 1 I’m able to build whole project with Visual Studio 2022 but cannot with command line, buildrelease.bat. Also tried with retarget solution but no hope. I’m trying to build python-3.12 NOGIL version E:\donghang\lib\nogil-3.12-nogil-3.12\Tools\msi>buildrelease.bat -x64 --skip-build Using py -3.10 (found 3.10 with py.exe) Fetching external libraries...
Fetching external tools... binutils already exists, skipping. gpg already exists, skipping. htmlhelp already exists, skipping. nuget already exists, skipping. redist-1 already exists, skipping. wix-314 already exists, skipping. Finished. Using "C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\amd64\MSBuild.exe" (found in the PATH) MSBuild version 17.9.5+33de0b227 for .NET Framework MSBUILD : error MSB1011: Specify which project or solution file to use because this folder contains more than one project or solution file.
MSBuild version 17.9.5+33de0b227 for .NET Framework Build started 09/07/2024 09:18:18 CH. Project "E:\donghang\lib\nogil-3.12-nogil-3.12\Tools\msi\launcher\launcher.wixproj" on node 1 (default targets). Project "E:\donghang\lib\nogil-3.12-nogil-3.12\Tools\msi\launcher\launcher.wixproj" (1) is building "E:\donghang\lib\nogil-3.12-nogil-3.12\PCbuild\pyshellext.vcxproj" (2) o n node 1 (Build target(s)). C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(456,5): error MSB8020: The build tools for v143 (Platform Tools et = 'v143') cannot be found.
To build using the v143 build tools, please install v143 build tools. Alternatively, you may upgrade to the current Visual Studio tools by se lecting the Project menu or right-click the solution, and then selecting "Retarget solution". [E:\donghang\lib\nogil-3.12-nogil-3.12\PCbuild\pyshellext.vcxproj] Done Building Project "E:\donghang\lib\nogil-3.12-nogil-3.12\PCbuild\pyshellext.vcxproj" (Build target(s)) -- FAILED. Done Building Project "E:\donghang\lib\nogil-3.12-nogil-3.12\Tools\msi\launcher\launcher.wixproj" (default targets) -- FAILED.
Build FAILED. "E:\donghang\lib\nogil-3.12-nogil-3.12\Tools\msi\launcher\launcher.wixproj" (default target) (1) -> "E:\donghang\lib\nogil-3.12-nogil-3.12\PCbuild\pyshellext.vcxproj" (Build target) (2) -> (PrepareForBuild target) -> C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(456,5): error MSB8020: The build tools for v143 (Platform Too lset = 'v143') cannot be found.
To build using the v143 build tools, please install v143 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [E:\donghang\lib\nogil-3.12-nogil-3.12\PCbuild\pyshellext.vcxproj] 0 Warning(s) 1 Error(s) Time Elapsed 00:00:00.15 I’m able to build with visual studio 21:23:10:157 Build started at 09:23 CH...
21:23:10:476 1>------ Build started: Project: pyshellext, Configuration: Release x64 ------ 21:23:10:871 1>pyshellext.vcxproj -> E:\donghang\lib\nogil-3.12-nogil-3.12\PCbuild\amd64\pyshellext.dll 21:23:10:915 ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== need help, thanks! steve.dower (Steve Dower) July 9, 2024, 2:25pm 2 Here is the error message you are getting. Use the Visual Studio installer to install the current version of MSVC, or else set PlatformToolset environment variable to whatever version you have installed (e.g. like v142 if you have 14.2 installed). pnthai88 (Thai N Pham) July 9, 2024, 2:31pm 3 Hello, thanks for reply, i noticed about it.
The build tools v143 from Visual Studio 2022 which i’m using exactly. Here is what i have image 952×395 16.7 KB steve.dower (Steve Dower) July 9, 2024, 3:16pm 4 Oh, it’s probably because there’s no 3.12 nogil version. Try building from the main branch of the repository, or using a 3.13 release tarball instead. pnthai88 (Thai N Pham) July 11, 2024, 5:25am 5 I download the source from here GitHub - colesbury/nogil-3.12-final: Multithreaded Python without the GIL (experimental rebase on 3.12 final) i thought it’s official nogil.
I success build it. thanks in advance steve.dower (Steve Dower) July 11, 2024, 1:02pm 6 Official releases come from python.org , nowhere else. Sam’s fork probably never updated the installer code. Get the source tarball from Python Release Python 3.13.0b3 | Python.org or follow the link to instructions on how to get the free-threaded (formerly known as “nogil”) build from the installers.