[笔记]20180818 Virtualenv
第一步安装virtualenv
$ sudo easy_install pip
$ sudo pip install --upgrade virtualenv
第二步创建一个沙盒目录
Create a Virtualenv environment in the directory ~/tensorflow:
$ virtualenv --system-site-packages ~/tensorflow
第三步c初始化环境变量
Activate the environment:
$ source ~/tensorflow/bin/activate # If using bash
停用环境
Deactivate
Python
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
评论
匿名评论
隐私政策
你无需删除空行,直接评论以获取最佳展示效果