1.
505 sudo pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade virtualenv
506 virtualenv --system-site-packages virtualenv01
507 cd virtualenv01/
508 ls
509 source ./bin/activate
510 easy_install -U pip
512 pip -V
513 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade tensorflow
tensorflow降级
pip uninstall tensorflow
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow==1.1.0
pypi源
vim ~/.pip/pip.conf
把配置信息都注释掉,让pip用回默认的官方源。
五分钟带你入门TensorFlow3零基础用TensorFlow玩转Kaggle的“手写识别
anaconda python2
conda create -n python2 python=2.7 anaconda
cd /anaconda3/bin
source activate python2
cd /anaconda3/bin
(python2) tempdeMacBook-Pro:bin temp$ source deactivate
conda install --channel https://conda.anaconda.org/anaconda tensorflow=1.1.0
jupyter notebook
版本:
import tensorflow as tf
tf.__version__
查询tensorflow安装路径为:
tf.__path__
python
python中,每个py文件被称之为模块,每个具有__init__.py文件的目录被称为包。