Tensorflow的离线安装包及安装成功测试代码

微信公众号:WELTest

离线安装包

安装

如果是在外网,下载安装包,解压文件之后使用pip安装:

pip install tensorflow-1.9.0-cp36-cp36m-win_amd64.whl

该包经过测试,不会报AVX2问题。在内网也经过安装测试,是可用的。内网安装时,依据提示一次安装依赖包。

Hello Tensorflow

安装完毕之后,这里给出测试代码。

#coding=utf-8

if __name__=="__main__":
    import tensorflow as tf
    hello=tf.constant("Hello Tensorlfow")
    sess=tf.Session()
    print(sess.run(hello))

通过pycharm执行截图如下:

也可以把文件保存,进入到文件所在目录,执行命令:

python hellow.py

在这里插入图片描述

发布了592 篇原创文章 · 获赞 221 · 访问量 130万+

猜你喜欢

转载自blog.csdn.net/henni_719/article/details/103297918
今日推荐