5

How one can use PyPy (preferably pypy3) instead of standard python with poetry?

That is, what should be stored in pyproject.toml? Are other changes necessary as well?

Dominik Filipiak
  • 1,192
  • 14
  • 26

1 Answers1

8

Turns out it is as easy as installing pypy3 (for OS X: brew install pypy3) and typing the following in the project directory:

poetry env use /usr/local/bin/pypy3 

given that PyPy lays in /usr/local/bin/pypy3.

Resolving all the dependencies for the new environment might be more tricky, but that's for the different questions.

Dominik Filipiak
  • 1,192
  • 14
  • 26
  • 3
    I ended up using `poetry env use $(which pypy3)`, which is more robust to changes of environments. (My use-case is building a CI pipeline) – FirefoxMetzger Jul 09 '22 at 15:59