Skip to content

Conversation

thefirst632student
Copy link

@thefirst632student thefirst632student commented Aug 30, 2025

  • Replace imports from distutils with setuptools._distutils to ensure compatibility with Python 3.12.
  • Remove MSVCCompiler import from distutils as it is no longer available in Python 3.12.
  • Adjust build_extension logic to identify MSVC compiler using compiler_type attribute instead of MSVCCompiler class.
  • Ensure compatibility with both older Python versions and Python 3.12+.

These changes resolve the issue ModuleNotFoundError: No module named 'distutils.msvccompiler' encountered during installation with Python 3.12.
-------------------------------------------------------------------------------------------------------------------------------------------- Powered by GitHub Copilot Pro

- Replace imports from `distutils` with `setuptools._distutils` to ensure compatibility with Python 3.12.
- Remove `MSVCCompiler` import from `distutils` as it is no longer available in Python 3.12.
- Adjust `build_extension` logic to identify MSVC compiler using `compiler_type` attribute instead of `MSVCCompiler` class.
- Ensure compatibility with both older Python versions and Python 3.12+.

These changes resolve the issue `ModuleNotFoundError: No module named 'distutils.msvccompiler'` encountered during installation with Python 3.12.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Powered by GitHub Copilot Pro
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

Successfully merging this pull request may close these issues.

1 participant