pythondotorg icon indicating copy to clipboard operation
pythondotorg copied to clipboard

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

Open LifornTag opened this issue 1 year ago • 2 comments

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'

LifornTag avatar Apr 24 '24 11:04 LifornTag

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

hugovk avatar Apr 24 '24 12:04 hugovk

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

milinsoft avatar Jun 09 '24 21:06 milinsoft