查看已安装tensorflow版本和路径,查看Python路径

1、查询自己安装的TensorFlow的版本:

cmd打开dos,然后依次输入:python

                                               import tensorflow as tf

                                               tf.__version__

查询结果如下:


2、查询自己安装的tensorflow路径

在python环境下输入:tf.__path__

查询结果如下:


3、查询自己安装的python路径

代码如下:

G:\code\moniter>python -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())"
C:\Python27\Lib\site-packages

G:\code\moniter>python -c "import os; print os.__file__"
C:\Python27\lib\os.pyc

G:\code\moniter>python -c "import sys; print sys.executable"
C:\Python27\python.exe


猜你喜欢

转载自blog.csdn.net/qq_25973779/article/details/80197082