Executorch editable install

When doing pip install -e . as opposed to pip install ., submodules don’t seem to exist. That is:

pip install -e .
python -c "import executorch" ← works
python -c "import executorch.exir" ← don’t work

on the other hand

pip install .
python -c "import executorch" ← works
python -c "import executorch.exir" ← works

Anyone see the same issue? I’m on Ubuntu 20.04 and Python 3.10, but I heard from colleagues I doesn’t work on other OS’s either…

1 Like

We’ve never tested with pip install -e, so I’m not too surprised that it doesn’t work. If you would find this useful, please create an issue in the github issue tracker describing what you’re looking for, and what the benefits would be. Or, if you’re able to figure out why -e doesn’t work, you could create a PR and we could take a look.

It works with:

pip install -e . --config-settings editable_mode=strict

Is this something that we want to add as part of install_requirements.sh or as part of documentation?

2 Likes

Nice! That works for me. It would be nice to have this documented in a README…

Editable installation support is not working again since New pip build system by dbort · Pull Request #2499 · pytorch/executorch · GitHub.

Btw, there’s a ticket for this: Error in Pip Install Editable Mode · Issue #2871 · pytorch/executorch · GitHub