5

I am looking to compile python source code into a binary. I generally use pypy for performance reasons (my application runs significantly faster using pypy). I found this answer from 2012 stating compiling pypy into binary isn't possible using any of the existing tools (e.g. pyinstaller). Compile PyPy to Exe. I wasn't quite able to follow what the top response was explaining as a solution.

I am wondering:

  1. Is there now a reasonably easy way to compile python code to binary using pypy as the interpreter?

  2. I don't actually need to use pypy, I just use it for the performance gains. Is there a reasonable way to avoid using pypy but still get similar performance gains? This would still need to support compiling to binary.

As an additional note, I use the 2.7 syntax.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Matt
  • 131
  • 2
  • 3

1 Answers1

6

you can take a look to nuitka ( http://nuitka.net/doc/user-manual.html)

 nuitka --standalone --recurse-on --python-version=2.7 main.py
MinhNV
  • 127
  • 8