just installed tensorflow using pip with the command:
$ pip install tensorflow
On the "Getting Started" for Tensorflow they have an example for convolutional neural networks
$ python tensorflow/models/image/mnist/convolutional.py
Where is that directory located when installing with pip?
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:
Below are the instructions to be followed for installing Tensorflow CPU on a Mac computer: If Python is installed, go to terminal as shown below. Then type pip3 as shown below. If pip is already installed on your Mac, you will see a lot of options as shown below. Then type pip3 install tensorflow as shown below.
1. Install the Python development environment on your system 2. Create a virtual environment (recommended) 3. Install the TensorFlow pip package tensorflow —Latest stable release with CPU and GPU support (Ubuntu and Windows) tf-nightly —Preview build (unstable) . Ubuntu and Windows include GPU support .
In the tf_m1 environment, you can now install the above two libraries using the following command: Once the two libraries are installed, you can test out TensorFlow by launching Python and then importing TensorFlow and printing out its version number:
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: [email protected] 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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With