pycall.rb icon indicating copy to clipboard operation
pycall.rb copied to clipboard

DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead

Open c-dilks opened this issue 1 year ago • 0 comments

Testing with Python 3.10.4, I get the following deprecation warnings when importing a python library with PyCall.import_module:

..../.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/pycall-1.4.1/lib/pycall/python/investigator.py:4: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.sysconfig import get_config_var, get_python_version
..../.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/pycall-1.4.1/lib/pycall/python/investigator.py:4: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
  from distutils.sysconfig import get_config_var, get_python_version
<module 'numpy' from '/usr/local/lib/python3.10/site-packages/numpy/__init__.py'>

Changing distutils.sysconfig to sysconfig at least silences the warning (see linked PR)

c-dilks avatar Jul 29 '22 03:07 c-dilks