Linux下安装任意版本的tensorflow命令


终端或命令行下输入:

wget https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl

或者

sudo pip install \
  -i https://pypi.tuna.tsinghua.edu.cn/simple/ \
  https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl

上述只是一个样例,安装任意版本的tensorflow,只需修改相应的版本号,比如,我现在想下载tensorflow-1.0.0版本的:  

sudo pip install \
  -i https://pypi.tuna.tsinghua.edu.cn/simple/ \
  https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/gpu/tensorflow_gpu-1.0.0-cp27-none-linux_x86_64.whl

如下:

测试是否安装成功:

  1. >>> import tensorflow as tf
  2. >>> hello = tf.constant( 'Hello, TensorFlow!')
  3. >>> sess = tf.Session()
  4. >>> print(sess.run(hello))

终端或命令行下输入:

wget https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl

或者

sudo pip install \
  -i https://pypi.tuna.tsinghua.edu.cn/simple/ \
  https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl

上述只是一个样例,安装任意版本的tensorflow,只需修改相应的版本号,比如,我现在想下载tensorflow-1.0.0版本的:  

sudo pip install \
  -i https://pypi.tuna.tsinghua.edu.cn/simple/ \
  https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/gpu/tensorflow_gpu-1.0.0-cp27-none-linux_x86_64.whl

如下:

测试是否安装成功:

  1. >>> import tensorflow as tf
  2. >>> hello = tf.constant( 'Hello, TensorFlow!')
  3. >>> sess = tf.Session()
  4. >>> print(sess.run(hello))

猜你喜欢

转载自blog.csdn.net/sinat_39372048/article/details/80930257