AcademySoftwareFoundation / AcademySoftwareFoundation/xstudio
xStudio Installation on Windows: Missing distutils in Python 3.12.7
- Dominant language
- C++
- Stars
- 769
- Forks
- 129
- Avg merge
- 9d 1m
- Merged PRs (30d)
- 10
Description
I encountered an issue while trying to build the xStudio project on Windows. The build process fails with an error indicating that the Python environment is missing the distutils module. Below are the details of the build output.
```
Severity Code Description Project File Line Suppression State Details
Error CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
Command failed: C:/xStudio/build/vcpkg/downloads/tools/python/python-3.12.7-x64/python.exe -I C:/xStudio/build/vcpkg_installed/x64-windows/tools/meson/meson.py -Ddoc=disabled -Dcache-build=disabled -Dtests=disabled --backend ninja --wrap-mode nodownload -Dbuildtype=plain --libdir lib --native C:/xStudio/build/vcpkg/buildtrees/fontconfig/meson-x64-windows-dbg.log -Ddebug=true --prefix C:/xStudio/build/vcpkg/packages/fontconfig_x64-windows/debug --includedir ../include -Dcmake_prefix_path=['C:/xStudio/build/vcpkg_installed/x64-windows/debug','C:/xStudio/build/vcpkg_installed/x64-windows','C:/xStudio/build/vcpkg_installed/x64-windows/share'] C:/xStudio/build/vcpkg/buildtrees/fontconfig/src/2.14.2-7f52ee670b.clean
Working Directory: C:/xStudio/build/vcpkg/buildtrees/fontconfig/x64-windows-dbg
Error code: 1
See logs for more information:
C:\xStudio\build\vcpkg\buildtrees\fontconfig\config-x64-windows-dbg-meson-log.txt.log
C:\xStudio\build\vcpkg\buildtrees\fontconfig\config-x64-windows-dbg-out.log C:\xStudio\scripts/cmake/vcpkg_execute_required_process.cmake
```
C:\xStudio\build\vcpkg\buildtrees\fontconfig\config-x64-windows-dbg-meson-log.txt.log
```
...
'utf-8' codec can't decode byte 0x90 in position 2: invalid start byte
Unusable script 'C:/xStudio/build/vcpkg/downloads/tools/python/python-3.12.7-x64/python.exe'
Could not introspect Python (['C:/xStudio/build/vcpkg/downloads/tools/python/python-3.12.7-x64/python.exe', 'C:\\Users\\user\\AppData\\Local\\Temp\\tmprgyhhhwt.py']): exit code 1
Program stderr:
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Temp\tmprgyhhhwt.py", line 5, in
import distutils.command.install
ModuleNotFoundError: No module named 'distutils'
..\src\2.14.2-7f52ee670b.clean\meson.build:47:0: ERROR: ['C:/xStudio/build/vcpkg/downloads/tools/python/python-3.12.7-x64/python.exe']> is not a valid python or it is missing distutils
```
C:\xStudio\build\vcpkg\buildtrees\fontconfig\config-x64-windows-dbg-out.log
```
...
Found pkg-config: C:/xStudio/build/vcpkg/downloads/tools/msys2/1e74ca60daa10104/mingw64/bin/pkg-config.exe (2.2.0)
Run-time dependency freetype2 found: YES 24.3.18
Run-time dependency expat found: YES 2.5.0
..\src\2.14.2-7f52ee670b.clean\meson.build:47:0: ERROR: ['C:/xStudio/build/vcpkg/downloads/tools/python/python-3.12.7-x64/python.exe']> is not a valid python or it is missing distutils
A full log can be found at C:\xStudio\build\vcpkg\buildtrees\fontconfig\x64-windows-dbg\meson-logs\meson-log.txt
```
Steps to Reproduce:
Attempt to build the xStudio project using the provided build commands.
Observe the output related to the missing distutils module.
Expected Behavior: The build should complete successfully without errors related to missing Python modules.
Additional Notes: From Python 3.12.x distutils was removed in favor of setuptools.
Dev environment tested with both 3.10 and 3.11 on PATH.
Contributor guide
Research direction
Reproduce the Windows build using the provided commands, then inspect scripts/cmake/vcpkg_execute_required_process.cmake and the referenced fontconfig Meson logs. Confirm the build no longer fails because the bundled Python 3.12 environment cannot import distutils.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100