torch / torch7

http://torch.ch
Other
9k stars 2.38k forks source link

attempt to index global 'lfs' (a nil value) when doing lfs.file_exists() #1024

Open NataliaDiaz opened 7 years ago

NataliaDiaz commented 7 years ago

/torch/install/bin/luajit: train.lua:263: attempt to index global 'lfs' (a nil value) stack traceback: train.lua:263: in main chunk [C]: in function 'dofile' ...nter/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x00406670

I have imported the following packages:

require 'nn'
require 'optim'
require 'image'
require 'torch'
require 'cutorch'
require 'xlua'
require 'math'
require 'string'
require 'cunn'
require 'nngraph'

is there some native lua package I am missing? I have also installed: luarocks install luafilesystem

ugoffugoff commented 6 years ago

you need to add require 'dp'

tastyminerals commented 6 years ago

What luarocks did you use when you were installing luafilesystem? You should use the one that comes with Torch ~/torch/install/bin/luarocks not the one that your Linux distribution has.