pythonpippycharm

Loading package from disk in Pycharm


I am trying to load a package in Pycharm that I have on disk.

Everythings works if I do this outside of Pycharm in a venv

pip install -e python/createInput

But using Pycharm's Install Package from Disk

enter image description here

When I click OK, nothing happens. No error, no acknowledgment. When I search for my package in the installed packages, it's not there. And I can't import it anywhere.

Update

I restarted Pycharm and refreshed its packages. I was able to install my package. I got a confirmation in the notifications. And it appears in the package manager enter image description here

But Pycharm still doesn't recognize it in my code. Importing in a terminal windows seems to work. But Pycharm can't find it
enter image description here

But pip knows that it's there enter image description here

So somehow, I can install it in the package manager, but Pycharm can't seem to find it

Here is a screenshot of my code and the Problems view

enter image description here

enter image description here


Solution

  • It turns out that Pycharm only support installing packages with setup.py and does not support packages using pyproject.toml

    See https://youtrack.jetbrains.com/issue/PY-57566/Support-PEP-660-editable-installs