使用virtualenv来安装tensorflow
current env
- os:ubuntu 14.04LTS
- python:2.7
- processor:Intel® Core™ i7-4710MQ CPU @ 2.50GHz × 8
- graphics:Intel® Haswell Mobile
- OS type:64-bit
prepare the pip and virtualenv
install pip and virtualenv
$ sudo apt-get install python-pip python-dev python-virtualenv
create a virtualenv environment in the directory
$ virtualenv --system-site-packages ~/data_mining/tensorflow
activate the environment
$ cd ~/data_mining/tensorflow/bin
$ source activate
deactivate the environment
(tensorflow)$ deactivate
install Tensorflow
(tensorflow)$ pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.1-cp27-none-linux_x86_64.whl
(tensorflow)$ pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-0.12.1-cp27-none-linux_x86_64.whl
startup with IPython
make sure you’ve activate the tensorflow environment
(tensorflow)$ ipython notebook
note: Only startup ipython in the tensorflow environment with virtualenv, we can use tensorflow in the ipython.