You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Python 3.13 with setuptools, numpy, and librosa, I encountered the following error:
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
This occurs because Python 3.13 has removed ImpImporter, but libraries like setuptools (even recent versions) still rely on it. This causes installation failures for numpy downgrades and breaks compatibility with librosa, pretty_midi, and music21.
Expected behavior
Libraries should install and import without errors.
Could you post the full error with complete trace ?
setuptools doesn't use pkgutil directly outside of pkg_resources. And all ImpImporter accesses are protected by if hasattr(pkgutil, 'ImpImporter').
setuptools version
setuptools 75.8.0
Python version
python 3.13
OS
windows 10
Additional environment information
Description
When using Python 3.13 with setuptools, numpy, and librosa, I encountered the following error:
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
This occurs because Python 3.13 has removed
ImpImporter
, but libraries like setuptools (even recent versions) still rely on it. This causes installation failures for numpy downgrades and breaks compatibility with librosa, pretty_midi, and music21.Expected behavior
Libraries should install and import without errors.
How to Reproduce
pip install librosa numpy==1.23.5 scipy matplotlib mido pretty_midi music21 mir_eval
import setuptools, librosa, numpy
Output
The process fails with the
pkgutil.ImpImporter
error.The text was updated successfully, but these errors were encountered: