-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No module named 'distutils' on Python 3.12 #732
Comments
try |
i had the same issue and that actually fixed it thank you |
Thank you for reporting this issue, finding a solution, trying and sharing a result. ref: https://docs.python.org/3/whatsnew/3.12.html#summary-release-highlights
I wonder adding |
I'm trying to use the |
The same for me. I'm trying to do |
I had the same problem while using tensorflow, I added this: |
Same problem, |
For MAC and Homebrew use |
Try |
there is a '_disutils_hacks' file in the environmental site-packages, which will tell you to import setuptools before disutils is being used anywhere, which will definitely solve the issue. |
hello - now with new Linux mint22 or ubuntu24 none of this will help .. and iam lost pip install --upgrade setuptools × This environment is externally managed
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. |
How to Fix the pip externally-managed-environment error on Linux: https://www.makeuseof.com/fix-pip-error-externally-managed-environment-linux/ |
This worked like a charm. Tried upgrading and reinstalling setuptools, but this did it. |
Restart the kernel if it doesn't work right away |
Thank you very much! Your solution is fantastic! |
Thank you all! |
This is what solved my problem. Working from a MAC and with python 3.12 Thank you so much |
Thank you very much |
On MacOS, I encountered this error with the main # Created virtualenv
virtualenv -p python3.12 venv
# Activated it
source venv/bin/activate
# Downloaded get-pip.py
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
# And upgraded pip version
python get-pip.py |
This worked for me. It's the proper and clean way. Apple M3 Pro / Sequoia 15.1.1 Thank you! |
Steps to reproduce
speech_recognition
andpyaudio
with pip (pip install SpeechRecognition
andpip install pyaudio
)Expected behaviour
hello
printed in the consoleActual behaviour
Because
distutils
was removed in Python 3.12, we getModuleNotFoundError: module named 'distutils'
System information
My Python version is 3.12.
The text was updated successfully, but these errors were encountered: