Open SyberiaK opened 8 months ago
try
pip install setuptools
try
pip install setuptools
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
gh-95299: Do not pre-install setuptools in virtual environments created with venv. This means that distutils, setuptools, pkg_resources, and easy_install will no longer available by default; to access these run pip install setuptools in the activated virtual environment.
I wonder adding pip install setuptools
to README.
I'm trying to use the pip install setuptools
but I still get the error "ModuleNotFoundError: No module named 'distutils'". Actually, any time I try to use a pip command, that's the result. any ideas on how to get around this? I'm running on Ubuntu if that helps
The same for me. I'm trying to do import undetected_chromedriver as uc
but get an ModuleNotFoundError: No module named 'distutils'
. I did pip install setuptools
and get Requirement already satisfied:...
. What I did wrong?
The same for me. I'm trying to do
import undetected_chromedriver as uc
but get anModuleNotFoundError: No module named 'distutils'
. I didpip install setuptools
and getRequirement already satisfied:...
. What I did wrong?
I had the same problem while using tensorflow, I added this: import setuptools.dist
Same problem, pip install setuptools
is not enough.
For MAC and Homebrew use brew install python-setuptools
Try pip install --upgrade setuptools
Got it from here
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 error: externally-managed-environment
× This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.12/README.venv for more information.
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. hint: See PEP 668 for the detailed specification.
hello - now with new Linux mint22 or ubuntu24 none of this will help .. and iam lost
pip install --upgrade setuptools error: externally-managed-environment
× This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.
If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. If you wish to install a non-Debian packaged Python application, it may be easiest to use pipx install xyz, which will manage a virtual environment for you. Make sure you have pipx installed. See /usr/share/doc/python3.12/README.venv for more information.
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. hint: See PEP 668 for the detailed specification.
How to Fix the pip externally-managed-environment error on Linux:
https://www.makeuseof.com/fix-pip-error-externally-managed-environment-linux/
The same for me. I'm trying to do
import undetected_chromedriver as uc
but get anModuleNotFoundError: No module named 'distutils'
. I didpip install setuptools
and getRequirement already satisfied:...
. What I did wrong?I had the same problem while using tensorflow, I added this: import setuptools.dist
This worked like a charm. Tried upgrading and reinstalling setuptools, but this did it.
Steps to reproduce
speech_recognition
andpyaudio
with pip (pip install SpeechRecognition
andpip install pyaudio
)mic = sr.Microphone() print('hello')