Ubuntu安装Torch教程,Ubuntu中如何安装Torch?

一. Torch是什么?


Torch是一个广泛支持机器学习算法的科学计算框架,由于采用简单而快速的脚本语言LuaJIT和一个底层的C/CUDA实现,Torch易于使用且高效。

屏幕快照_2017-06-09_下午11.47_.02_.png



二. Torch的版本支持
最新版的Torch支持Ubuntu,Fedora20,Fedora22,Centos7。但不支持Fedora21,Centos6。
 
三. ubuntu安装Torch
# in a terminal, run the commands
git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch; bash install-deps;
./install.sh
有时候在执行bash install-deps安装依赖时并未出错,但执行./install.sh时会出一些错误,解决办法我。
T做了一个汇总,希望能帮助大家:
 
五. torch安装问题汇总
1. 错误类似于:
nvcc error : '***' died due to signal
解决方案:sudo ./install.sh

错误2
Error: Build error: Failed building.
Updating manifest for /root/torch/install/lib/luarocks/rocks
fftw3 scm-1 is now built and installed in /root/torch/install/ (license: BSD)

错误3
Error: Failed installing dependency: https://raw.githubusercontent. ... .rock - Could not find header file for OPENSSL
No file openssl/evp.h in /usr/local/include
No file openssl/evp.h in /usr/include
You may have to install OPENSSL in your system and/or pass OPENSSL_DIR or OPENSSL_INCDIR to the luarocks command.
Example: luarocks install luacrypto OPENSSL_DIR=/usr/local
参照Problem with Torch #86,执行
sudo apt-get install -y libssl-dev
安装libssl-dev,之后重新安装Torch即可。

错误4:

提示缺少依赖lbase64 ,luacrypto,uuid 等,可直接执行如下代码
luarocks install missed-package

0 个评论

要回复文章请先登录注册