18

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?

enter image description here

mCs
  • 2,591
  • 6
  • 39
  • 66
  • What's the executed command? -- You should always avoid posting screenshots of text (or code), and copy-paste the text into your question instead. – sinoroc Feb 01 '23 at 09:18
  • No command is executed it just popup at some times. I think PyCharm is doing sth underneeth but I do not know what. – mCs Feb 01 '23 at 09:27
  • @sinoroc just added full command to the post. PyCharm is probably doing sth expected but I do not know what ;) – mCs Feb 01 '23 at 09:34

2 Answers2

8

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
Russell
  • 1,252
  • 15
  • 21
-4

Check if pip is installed and is added to path variable. It seems like pip is missing, Download pip and try again.

Linux:

sudo apt install python3-pip

Follow this documentation for more. https://pip.pypa.io/en/stable/installation/

pip install setuptools
Amrit Pangeni
  • 41
  • 1
  • 5