CentOS 6安装说明

Warning

If you want to install the bleeding-edge or development version of Theano from GitHub, please make sure you are reading the latest version of this page.

Requirements

Note

We only support the installation of the requirements through conda.

Python >= 2.7 or >= 3.3 The development package (python-dev or
python-devel on most Linux distributions) is recommended (see just below). Python 2.4 was supported up to and including the release 0.6. Python 2.6 was supported up to and including the release 0.8.2. Python 3 is supported past the 3.3 release.
NumPy >= 1.9.1 < 1.11.1
Earlier versions could work, but we don’t test it.
SciPy >= 0.14 < 0.17.1
Only currently required for sparse matrix and special functions support, but highly recommended. SciPy >=0.8 could work, but earlier versions have known bugs with sparse matrices.
BLAS installation (with Level 3 functionality)
  • Recommended: MKL, which is free through Conda.
  • Alternatively, we suggest to install OpenBLAS, with the development headers (-dev, -devel, depending on your Linux distribution).

Optional requirements

python-dev, g++ >= 4.2
Highly recommended. Theano can fall back on a NumPy-based Python execution model, but a C compiler allows for vastly faster execution.
nose >= 1.3.0
Recommended, to run Theano’s test-suite.
Sphinx >= 0.5.1, pygments
For building the documentation. LaTeX and dvipng are also necessary for math to show up as images.
pydot-ng
To handle large picture for gif/images.
NVIDIA CUDA drivers and SDK
Highly recommended Required for GPU code generation/execution on NVIDIA gpus. See instruction below.
libgpuarray
Required for GPU/CPU code generation on CUDA and OpenCL devices (see: GpuArray Backend.)

安装

稳定安装

Install the latest stable version of Theano with:

<sudo> pip install <--user> Theano[test, doc]
  • Any argument between <...> is optional.
  • 对于root安装,请使用sudo
  • user用于用户安装,不需要管理员权限。它将Theano安装在你本地的site-packages中。
  • [test]将安装测试需要的包。
  • [doc]将安装生成文档需要的包。

如果你遇到任何问题,请前往Troubleshooting页面。

libgpuarray

对于稳定版本的Theano你需要一个特定版本的libgpuarray,标记为v-9998用下面的方式下载:

git clone https://github.com/Theano/libgpuarray.git --tags
git checkout origin/v-9998
cd libgpuarray

然后按照逐步说明进行操作。

开发人员的安装

Install the developer version of Theano with:

git clone git://github.com/Theano/Theano.git
cd Theano
<sudo> pip install <--user> <--no-deps> -e .
  • Any argument between <...> is optional.
  • Use sudo for a root installation.
  • Use user for a user installation without admin rights. It will install Theano in your local site-packages.
  • Use no-deps when you don’t want the dependencies of Theano to be installed through pip. This is important when they have already been installed as system packages.
  • -e makes your installation editable, i.e., it links it to your source directory.

如果你遇到任何问题,请前往Troubleshooting页面。

libgpuarray

Install the latest, development version of libgpuarray following the Step-by-step instructions.