[Python] Pycharm recognizes package installed with -e (editable), but does not recognize the...

Discussão em 'Python' iniciado por Stack, Agosto 29, 2025.

  1. Stack

    Stack Membro Participativo

    I've installed my own custom package with -e 'git+https://.....@main#egg=package'. I build my dependencies with pip-tools (pip-compile), and install them with pip-sync (I was not aware this could make a difference).

    The package shows as "installed" when I look at the installed packages of the interpreter in Pycharm. But it's contents are not detected, all imports using that package are red, no autocompletion, etc. But, everything works fine, it's only Pycharm, not finding the contents of the installed package, and thus only a "display" or IDE problem. In Pycharm, I can run tests and things, everything works but the visuals, which is important for me, to quickly access this package's content under "External Libraries". As it did before, but not anymore, since a few versions... I ignored it a few months, but it's really annoying...so here I am.

    I've updated the installed package to use a pyproject.toml, as I thought this could be the reason, but it was not.

    I could install without -e, but then I would need to pip cache purge before installing an updated version, or I would need to install with a commit hash instead of just main - if possible, I would not go this way.

    Continue reading...

Compartilhe esta Página