When installing a package I get the error:
ImportError: cannot import name 'setuptools' from setuptools
I am on the latest setuptools version 69.5.1
at the time of writing.
I needed to downgrade setuptools
. The package I was trying to install does have from setuptools import setuptools
in their setup.py
, so the error makes sense.
After some experimentation it looks like this change was introduced in the move from version 68.x.x
to 69.x.x
. So versions of setuptools
<69 seem to work.
pip install setuptools==69.0.0
python -c "from setuptools import setuptools; print(setuptools.__version__)" # ImportError: cannot import name 'setuptools' from setuptools
python -c "import setuptools; print(setuptools.__version__)" # 69.0.0
---
pip install setuptools==68.0.0
python -c "from setuptools import setuptools; print(setuptools.__version__)" # 68.0.0