Skip to content

[BUG]: Distutils is going to be deprecated with Python3.12 #3677

Closed

Description

@Azrael3000

Required prerequisites

Problem description

In Python 3.12 distutils is going to be removed and with 3.10 it's marked as deprecated. Currently tools/FindPythonLibsNew.cmake is still using

"${PYTHON_EXECUTABLE}" "-c" "from distutils import sysconfig as s;import sys;import struct;

It might be replaceable by a simple import sysconfig as s;

See [0] and [1]

Kind regards,
Arno

Reproducible example code

No response

Activity

  1. henryiii commented on Feb 2, 2022

    @henryiii
    Collaborator

    You can also just use the modern FindPython support, as CMake's FindPythonLibs/FindPythonInterp is also deprecated. ;)

    I think the same sort of thing as done in #3663 would be needed here.

  2. henryiii commented on Feb 2, 2022

    @henryiii
    Collaborator
    AttributeError: module 'sysconfig' has no attribute 'get_python_inc'
    
  3. henryiii commented on Feb 2, 2022

    @henryiii
    Collaborator

    This looks useful: pytorch/pytorch@4b96fc0

  4. added a commit that references this issue on Feb 28, 2022
    5262ff7
  5. added a commit that references this issue on Mar 1, 2022
    465b2e0
  6. added 2 commits that reference this issue on Mar 2, 2022
    035b47d
    bdec573
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNew bug, unverified

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions