Where is the folder for Installing tensorflow with pip, Mac OSX?

前端 未结 2 1153
醉酒成梦
醉酒成梦 2021-01-31 07:57

just installed tensorflow using pip with the command:

$ pip install tensorflow

On the \"Getting Started\" for Tensorflow they have an example for co

2条回答
  •  伪装坚强ぢ
    2021-01-31 08:27

    Installing with pip, installs the packages to the directory "site-packages".

    The following code shows the location of tensorflow as well as where pip installs the packages:

    $ pip show tensorflow
    

    Which return:

    Metadata-Version: 2.0
    Name: tensorflow
    Version: 0.5.0
    Summary: TensorFlow helps the tensors flow
    Home-page: http://tensorflow.com/
    Author: Google Inc.
    Author-email: opensource@google.com
    License: Apache 2.0
    Location: /usr/local/lib/python2.7/site-packages
    Requires: six, numpy
    

    here Location: shows where the package is installed with

    $ cd /usr/local/lib/python2.7/site-packages/tensorflow
    

    EDIT:

    As some people pointed out in the newer versions of tensorflow and depending on the $ echo $TENSORFLOW you need to look in either

    $ cd /usr/local/lib/python{2,3}.X/{site,dist}-packages/tensorflow
    

    Or

    $ cd /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework
    

提交回复
热议问题