ndreynolds / ex_termbox

Low-level termbox bindings for Elixir
MIT License
55 stars 14 forks source link

Using a different python executable #9

Open zachdaniel opened 2 years ago

zachdaniel commented 2 years ago

Not sure if I'm even going in the right direction here. Mac recently stopped coming packaged with python 2.7 with the python executable, so now only python3 is available. Is there some way I can configure this to be used instead? I could probably make a copy of the executable I currently have, but that feels like a solution that will come with its own issues/break at some point.

zachdaniel commented 2 years ago

This is the error that I get:

==> ex_termbox
cd c_src/termbox && CFLAGS=-fPIC ./waf configure --prefix=. && ./waf
env: python: No such file or directory
make: *** [c_src/termbox/build/src/libtermbox.a] Error 127
could not compile dependency :ex_termbox, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile ex_termbox", update it with "mix deps.update ex_termbox" or clean it with "mix deps.clean ex_termbox"
mhanberg commented 2 years ago

You can do this to get a non versioned python executable on recent macos versions by adding the following to you path (assuming you have python3 installed via homebrew

export PATH="$brew_prefix/opt/python@3.9/libexec/bin:$PATH"

$brew_prefix being the appropriate homebrew prefix for you mac architecture, either /opt/hombrew or /usr/local.