lupa
lupa copied to clipboard
How to specify the lua version
Hi, My lua version is 5.2.But when I execute lua.require('socket')
, out :
LuaError: module 'socket' not found: no field package.preload['socket'] no file './socket.lua' no file '/usr/share/luajit-2.0.0-beta9/socket.lua' no file '/usr/local/share/lua/5.1/socket.lua' no file '/usr/local/share/lua/5.1/socket/init.lua' no file '/usr/share/lua/5.1/socket.lua' no file '/usr/share/lua/5.1/socket/init.lua' no file './socket.so' no file '/usr/local/lib/lua/5.1/socket.so' no file '/usr/lib/x86_64-linux-gnu/lua/5.1/socket.so' no file '/usr/lib/lua/5.1/socket.so' no file '/usr/local/lib/lua/5.1/loadall.so'
And lua.globals()._VERSION
is Lua 5.1
it looks like you've built lupa for LuaJIT. Try installing lupa with --no-luajit
(python setup.py install --no-luajit
); if Lua 5.2 development packages are set up correctly lupa should pick them.