pypipycharm95% confidence\u2191 29

Error: Python packaging tool 'setuptools' not found

Full error message
I have a poetry project that is not using setuptools

[tool.poetry.dependencies]
python = ">=3.9,<3.11"
opencv-python = "^4.7.0.68"
tensorflow-macos = "^2.11.0"
tensorflow-metal = "^0.7.0"

but I keep getting this error in pycharm. Command from screenshot:

/Users/mc/Library/Caches/pypoetry/virtualenvs/besafe-_8yAv-v6-py3.9/bin/Python /Users/mc/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/223.8214.51/PyCharm.app/Contents/plugins/python/helpers/packaging_tool.py list

It just pops up without any action from my side. It seems like PyCharm is doing some execution under the hood but I do not know what is it.

I do not understand how am I supposed to fix this?

While it seems that this requires a fix from the PyCharm team, an interim solution is to install setuptools as a development dependency, new version (thanks @milonimrod) poetry add --group dev setuptools old version, poetry add --dev setuptools

API access

Get this solution programmatically \u2014 free, no authentication.

curl https://depscope.dev/api/error/1f7a48ad9f0cf847b7ec2af77303b915c4a3ce88ae07f8243bb23675fc7c0837
hash \u00b7 1f7a48ad9f0cf847b7ec2af77303b915c4a3ce88ae07f8243bb23675fc7c0837
Error: Python packaging tool &#39;setuptools&#39; not found — DepScope fix | DepScope