Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xStudio Installation on Windows: Missing distutils in Python 3.12.7 #123

Open
derek-rein opened this issue Oct 20, 2024 · 1 comment
Open

Comments

@derek-rein
Copy link

derek-rein commented Oct 20, 2024

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 <module>
    import distutils.command.install
ModuleNotFoundError: No module named 'distutils'


..\src\2.14.2-7f52ee670b.clean\meson.build:47:0: ERROR: <PythonExternalProgram 'python' -> ['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: <PythonExternalProgram 'python' -> ['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.

@maxpareschi
Copy link

I can second the bug, same problem on my end.
solution would be to upgrade meson to >= 1.3.0 to be compatible with 3.12 after distuitils removal or downgrade to python 3.11 for this particular build as mentioned here:
microsoft/vcpkg#35332

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants