我刚安装了Torch7as per the instructions。但是,我无法通过命令行解释器移植任何包:
kamransiquisMBP:~ khsiddiqui$ th
______ __ | Torch7
/_ __/__ ________/ / | Scientific computing for Lua.
/ / / _ \/ __/ __/ _ \ | Type ? for help
/_/ \___/_/ \__/_//_/ | https://github.com/torch
| http://torch.ch
th> require "nn"
...rs/khsiddiqui/torch/install/share/lua/5.1/trepl/init.lua:384:
...rs/khsiddiqui/orch/install/share/lua/5.1/trepl/init.lua:384:
loop or previous error loading module 'torch'
stack traceback:
[C]: in function 'error
...rs/khsiddiqui/torch/install/share/lua/5.1/trepl/init.lua:384:
in function 'require' [string "_RESULT={require "nn"}"]:1: in main chunk
[C]: in function 'xpcall'
...rs/khsiddiqui/torch/install/share/lua/5.1/trepl/init.lua:651:
in function 'real'...iqui/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199:
in main chunk
[C]: at 0x010fc1cd00
th> 1 + 1
2
在解释器外部(仅从命令行)我运行了命令
luarocks install nn
,但上面描述的相同错误仍然存在。我很想把7号火把开起来跑!
嗨,@deltheil。。。
kamransiquisMBP:~ khsiddiqui$ luajit -ltorch
luajit: /usr/local/share/lua/5.1/torch/init.lua:11: cannot load
'/usr/local/lib/lua/5.1/libtorch.so'
stack traceback:
[C]: in function 'require'
/usr/local/share/lua/5.1/torch/init.lua:11: in main chunk
[C]: at 0x010a587dd0
[C]: at 0x010a50bd00
在
luajit
之后运行以下命令。。。th> ok, err = pcall(require, 'libtorch')
th> print(ok, err)
false error loading module 'lib torch' from file
'/usr/local/lib/lua/5.1/libtorch.so':
dlopen(/usr/local/lib/lua/5.1/libtorch.so,
6): Library not loaded: libmkl_intel_lp64.dylib
Referenced from: /Users/khsiddiqui/torch/install/lib/libTH.dylib
Reason: image not found
最佳答案
感谢@delthel的帮助!
As per the instructions on this page,对我(在Mac OSX上)起作用的是:
查找并删除文件./pkg/torch/lib/TH/cmake/FindMKL.cmake
。。。
通过运行./clean.sh; ./install.sh
,执行干净的安装。。。
在火炬按预期运行之后:-)。我们说话的时候我是机器学习!
关于bash - 将软件包导入Torch时出错,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/36530699/