Fork me on github

【tensorflow】在 Ubuntu/Linux 环境下安装TF遇到的问题 [Errno 13] Permission denied

环境:Ubuntu虚拟机 / python2.7

按照官网安装: $ pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl 

提示:Could not install packages due to an Environment Error: [Errno 13] Permission denied: “。。。balabal”

解决方案:

plan A:在pip之前加:sudo,问题解决!

plan B:还有一个方案是也可以在windows系统下用的,在后面加参数 --user(ps.不过还没亲自试过)

 

测试tensorflow代码:

import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print sess.run(hello)
a = tf.constant(10)
b = tf.constant(32)
print sess.run(a+b)

 

posted @ 2019-09-27 17:57  未配妥剑,已入江湖  阅读(1127)  评论(0编辑  收藏  举报