使用 virtualenv 安装TensorFlow ,这样可以安装不同的python版本的Tensorflow了。
Take the following steps to install TensorFlow with Virtualenv:
-
Install pip and virtualenv by issuing one of the following commands:
sudo apt-get install python-pip python-dev python-virtualenv # for Python 2.7 $ sudo apt-get install python3-pip python3-dev python-virtualenv # for Python 3.n
$ -
Create a virtualenv environment by issuing one of the following commands:
virtualenv --system-site-packages targetDirectory # for Python 2.7 $ virtualenv --system-site-packages -p python3 targetDirectory # for Python 3.n
$