Skip to content

Unable to access get_info without DeprecationWarning #21431

@bashtage

Description

@bashtage

Describe the issue:

get_info is needed to locate various libraries and headers for building extension modules. It is located in from numpy.distutils.misc_util, and importing it seems to lead to a DeprecationWarning

Reproduce the code example:

from numpy.distutils.misc_util import get_info

Error message:

`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
    of the deprecation of `distutils` itself. It will be removed for
    Python >= 3.12. For older Python versions it will remain present.
    It is recommended to use `setuptools < 60.0` for those Python versions.
    For more details, see:
      https://numpy.org/devdocs/reference/distutils_status_migration.html


### NumPy/Python version information:

From CI so not easy to run command directly

Python 3.10.4 x64 (Linux)
1.23.0.dev0+1087.g0eaa40db3


Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions