Lupa can't find lua on OSX 10.11.4 El Capitan

326 Views Asked by At

I'm following official docs to install lupa:

brew install lua
brew install pkg-config
pip install lupa

After I run that I can successfully run lua from command line from any folder. However, when running Django management commands (e.g. python manage.py migrate), I get following error:

dyld: lazy symbol binding failed: Symbol not found: _luaL_newstate
  Referenced from: /Users/oz/.virtualenvs/my_project/lib/python2.7/site-packages/lupa/_lupa.so
  Expected in: flat namespace

dyld: Symbol not found: _luaL_newstate
  Referenced from: /Users/oz/.virtualenvs/my_project/lib/python2.7/site-packages/lupa/_lupa.so
  Expected in: flat namespace

Trace/BPT trap: 5

I'm running OSX 10.11.4 El Capitan, pip 8.1.2, lupa 1.3, lua 5.2.4.

How can I make lupa work?

1

There are 1 best solutions below

0
On BEST ANSWER

Solution is to install lupa with LDFLAGS:

brew install lua
brew install pkg-config
LDFLAGS="-L/usr/local/bin/lua" pip install lupa --no-binary :all: