Virtualboxを使ってWindowsマシン上にubuntuの環境を作り、chainerとtensorflowをインストールする手順をざっくり書いてみました。
virtualbox
https://www.virtualbox.org/wiki/Downloads
ubuntu14.04LTS
ダウンロード
https://www.ubuntulinux.jp/News/ubuntu1404-ja-remix
ubuntu14.04 LTSインストール
- virtualbox起動
- 新規から仮想マシン作成
- ISOをドライブに設定する
設定、ストレージのCDのマークの空を選択し、右側出てきたCDのマークを押して、ダウンロードしたISOファイルを指定する
-
起動を押して、仮想マシンを起動する
-
ubuntuをインストール
インストール画面になるので、「ubuntuをインストール」を押してインストールする
Anaconda
anacondaを下記からダウンロードしてインストールする
bash
user@mypc:~/work/Environment$ bash Anaconda2-2.5.0-Linux-x86_64.sh
Welcome to Anaconda2 2.5.0 (by Continuum Analytics, Inc.)
In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>
bash
cryptography
A Python library which exposes cryptographic recipes and primitives.
Do you approve the license terms? [yes|no]
>>> yes
bash
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
[/home/user/anaconda2] >>>
bash
installation finished.
Do you wish the installer to prepend the Anaconda2 install location
to PATH in your /home/user/.bashrc ? [yes|no]
[no] >>> yes
condaをアップデートする
bash
conda update conda
conda update anaconda
chainer
chainerをインストールする
'/home/user/anaconda2/bin'にpathが通っていない場合は下記のようにしてあげるといいです。
bash
user@mypc:~/work/Environment$ source ~/.bashrc
あとは仮想環境を作ってinstallするだけです。
詳しくはここを参照してください。
bash
user@mypc:~/work/Environment$ conda create -n chainer python=2.7 anaconda
user@mypc:~/work/Environment$ source activate chainer
(chainer)user@mypc:~/work/Environment$ pip install chainer
tensorflow
仮想環境を作ってinstallするだけです。
詳しくはここを参照してください。
bash
user@mypc:~/work/Environment$ conda create -n tensorflow python=2.7 anaconda
user@mypc:~/work/Environment$ source activate tensorflow
(tensorflow)user@mypc:~$ pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl