我试图在我的 Win7 系统上安装 Torch 7 来运行 RNN,这太疯狂了。我很容易在我的 Ubuntu VM 上安装了它,但是它无法访问我的 GPU 以进行 CUDA 加速,所以我要么尝试实验性 PCI 直通软件,要么尝试在 Windows 上安装 Torch。到目前为止,我已经设法安装了 Lua 和 LuaRocks(但除了 C:\Program Files (x86)\LuaRocks\2.2 路径之外,我无法从任何地方运行它)。我已经安装了mingw和cmake。我尝试使用以下命令安装 Torch:
luarocks --server=https://raw.githubusercontent.com/torch/rocks/master install torch
(来源:在 Windows 上使用 Luarocks 安装 Torch7 并出现 mingw 构建错误)
但我得到:
Missing dependencies for torch:
paths >= 1.0
Using https://raw.githubusercontent.com/torch/rocks/master/paths-scm-1.rocksp
Cloning into 'paths'...
remote: Counting objects: 10, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 10 (delta 0), reused 5 (delta 0), pack-reused 0
Receiving objects: 100% (10/10), 12.81 KiB | 0 bytes/s, done.
Checking connectivity... done.
cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Rele
gram Files (x86)/lua/5.3/include/" -DLUA_LIBDIR="C:/Program Files (x86)/lua/5
uaRocks\systree/lib/luarocks/rocks/paths/scm-1/lua" -DLIBDIR="C:\Program File
/paths/scm-1/lib" -DCMAKE_INSTALL_PREFIX="C:\Program Files (x86)\LuaRocks\sys
gw32-make
-- Building for: NMake Makefiles
CMake Warning in :
To use the NMake generator, cmake must be run from a shell that can use the
compiler cl from the command line. This environment does not contain
INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to
work.
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error in :
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
CMake Error in :
The CMAKE_CXX_COMPILER:
cl
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
我不知道 cl 编译器在哪里,或者即使我的系统上有它。关于我的 PATH 变量,它显然是一个用户变量,而不是系统变量(我没有系统 PATH 变量)。我不知道这是否有问题。它目前看起来像这样:
C:\Users\USERNAME\AppData\Roaming\npm;C:\MinGW\bin;C:\Program Files (x86)\lua\5.3\bin;C\Program Files (x86)\LuaRocks\2.2;C:\Users\USERNAME\AppData\Roaming\LuaRocks\bin;C:\Program Files (x86)\LuaRocks\systree\bin
我不知道这是否正确,但如果它是为了让我从它们各自的 bin 目录之外运行 lua 或 luarocks,它就会失败。如果有人有更简单的在 Windows 上安装 Torch 的方法,请告诉我(或者见鬼,甚至是在 VM 中启用 GPU 加速的方法。任何摆脱这种卡住情况的方法)。