MichaelTMatthews/Craftax

Cannot build in editable mode?

Closed this issue · 2 comments

Hi,

I wanted to check out Craftax as a possible benchmark for an RNN-RL project, but I'm having some trouble building the project locally (pip install craftax works fine) that seems like it might be a bug. When trying to pip install in editable mode (on python 3.10.12), I get the following:

riley@monolith:~/research/rl_rnn_demo/Craftax$ pip install -e .
Defaulting to user installation because normal site-packages is not writeable
Obtaining file:///home/riley/research/rl_rnn_demo/Craftax
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
ERROR: Project file:///home/riley/research/rl_rnn_demo/Craftax has a 'pyproject.toml' and its build backend is missing the 'build_editable' hook. Since it does not have a 'setup.py' nor a 'setup.cfg', it cannot be installed in editable mode. Consider using a build backend that supports PEP 660.

Can you advise on how to resolve/whether this is a Craftax issue?

Hi Riley,

Thanks for for raising this. I was able to reproduce this error on pip version 22 with setuptools version 58.
Upgrading my pip version (to 24) and setuptools version (to 69) resolved this error.
I'll update the pyproject.toml to require setuptools>=64 and the README to recommend upgrading pip.
Let me know if that sorts it out for you.

Hi Michael,

Yes, that seems to have done the trick for me as well. Thanks for the quick response!