It is a bug in Pycharm:
https://youtrack.jetbrains.com/issue/PY-57566/Support-PEP-660-editable-installs
Pycharm cannot (yet) deal with the advanced ways setuptools installs editable packages. Using either
a different build backend in pyproject.toml, for example hatchling.
or compat flag at install time (pip install -e /Users/whoever/dev/my-package --config-settings editable_mode=compat) - this does not work in requirements files, though.
Should solve this problem. DISCLAIMER, I've only tested the hatchling version, works fine for me.
Background/WHY?
In site-packages, the file mypackage-0.6.77.dist-info/direct_url.json contains infos where the editable package can be found. Installed with hatchling, this file just contains a path. With setuptools, it contains a pointer to .pth file, and this is not understood by Pycharm.