0

i have been using lua for torch in command like. where i used luarocks to install packages but now i have a need to debug some code. As suggested by the community "Zerobrane Studio" is a lightweight IDE for that purpose. i have installed it on ubuntu 14.04.

Now i want to install the same packages as the IDE has its own installation of lua. Packages are i.e "dp, dpnn, nn" but after some search i found out ZeroBranes Studio uses luadist package manager. i went onto luadist.org. and tried one of the ways which lets you download the package using lua. i ran this code in the IDE. but it didn't work.

Use LuaDist functionality from Lua.

$ ./lua
> local ld = require "dist"
> ld.install("luaexpat")

Please help!

4

1 回答 1

2

It should be sufficient in most cases to set the package.path and package.cpath paths in your script to provide access to those modules you are using (whether those modules are from LuaDist, Luarocks or manually installed next to your application scripts).

ZeroBrane Studio provides luadist plugin that simplifies the integration with modules installed from LuaDist and allows management of those modules directly from the Local console in the IDE. This plugin will also set the paths for the script (when running/debugging from the IDE), so you don't need to make any changes to the script itself, but it's likely to work only for the modules installed into that instance of LuaDist.

You may also want to check this post on Lua package managers and their integration with ZeroBrane Studio.

于 2017-10-13T16:18:52.847 回答