Search code examples
torch

torch packages not found after reinstall


I had a running torch version in my home folder using packages from /usr/share/lua/5.1. Then I reinstalled torch (removed the folder in home, got a fresh one and ran installation scripts from "getting started with torch"). All the packages are still there in the /usr/share, but when running the new torch I get the error that they are missing. For example the package cv:

/home/nbackfisch/torch/install/bin/luajit: /home/nbackfisch/torch/install/share/lua/5.1/trepl/init.lua:389: /home/nbackfisch/torch/install/share/lua/5.1/trepl/init.lua:389: module 'cv' not found:No LuaRocks module found for cv no field package.preload['cv'] no file '/home/nbackfisch/.luarocks/share/lua/5.1/cv.lua' no file '/home/nbackfisch/.luarocks/share/lua/5.1/cv/init.lua' no file '/home/nbackfisch/torch/install/share/lua/5.1/cv.lua' no file '/home/nbackfisch/torch/install/share/lua/5.1/cv/init.lua' no file './cv.lua' no file '/home/nbackfisch/torch/install/share/luajit-2.1.0-beta1/cv.lua' no file '/usr/local/share/lua/5.1/cv.lua'

What did I wrong?


Solution

  • The solution included 3 simple steps. First problem was that I reinstalled using sudo. So first I changed rights of the git clone of torch, then installed with the normal procedure without sudo and finally cleared the luarocks cache. Clearing the cache was the most important point, because afterwards I was able to reinstall all custom and extra packages.