首页 > 系统服务 > 详细

mac使用pip3安装tensorflow(不用conda)

时间:2019-11-15 14:04:32      阅读:86      评论:0      收藏:0      [点我收藏+]

在终端中输入pip3 install tensorflow回提示一个当先版本匹配不到的错误提示

在终端中输入:

pip3 --default-timeout=10000 install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.3.0-py3-none-any.whl

测试代码:

import tensorflow as tf

str = tf.constant(‘hello‘)

print(str)

sess = tf.Session()

rs = sess.run(str)

print(rs)

#b‘hello‘

type(rs)

#<class ‘byte‘>

mac使用pip3安装tensorflow(不用conda)

原文:https://www.cnblogs.com/mituzhifan-/p/11865745.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!