python / pythondotorg

Source code for python.org
https://www.python.org
Apache License 2.0
1.47k stars 587 forks source link

I can't install distutils, it says the following error: No matching distribution found for distutils, tell me what to do? #2439

Open LifornTag opened 2 months ago

LifornTag commented 2 months ago

python C:\Users\Admin\Desktop\assistant.py Traceback (most recent call last): File "C:\Users\Admin\Desktop\assistant.py", line 58, in command = recognize_command() ^^^^^^^^^^^^^^^^^^^ File "C:\Users\Admin\Desktop\assistant.py", line 12, in recognize_command with sr.Microphone() as source: ^^^^^^^^^^^^^^^ File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\speech_recognition__init.py", line 80, in init__ self.pyaudio_module = self.get_pyaudio() ^^^^^^^^^^^^^^^^^^ File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\speech_recognition__init__.py", line 111, in get_pyaudio from distutils.version import LooseVersion ModuleNotFoundError: No module named 'distutils'

hugovk commented 2 months ago

This is the tracker for the https://www.python.org/ website.

Please close this issue and ask your question in the help forum: https://discuss.python.org/c/users/7

milinsoft commented 3 weeks ago
from distutils.version import LooseVersion

ModuleNotFoundError: No module named 'distutils'

Remove the distutils package. It was deprecated in Python 3.10 by PEP 632 “Deprecate distutils module”. For projects still using distutils and cannot be updated to something else, the setuptools project can be installed: it still provides distutils. (Contributed by Victor Stinner in gh-92584.)

Source: https://docs.python.org/3/whatsnew/3.12.html