Python and TensorFlow Installation

<< Click to Display Table of Contents >>

Navigation:  Installation of PAI Infrastructure > MacOS >

Python and TensorFlow Installation

Although MacOS provides Python libraries by default we recommend installing the newest available Python version 3.8 from the website https://www.python.org/downloads/mac-osx/

Install TensorFlow using the Terminal command:

python3 -m pip3 install --upgrade tensorflow

Check that tensorflow appears in the list of installed packages:

python3 -m pip list

Test TensorFlow using the command terminal:

python3 -c "import tensorflow as tf;print(\"Num GPUs Available: \", len(tf.config.experimental.list_physical_devices('GPU')))"

This test returns the number of compatible GPUs available for PAI (zero is an acceptable result if you do not have a compatible NVIDIA GPU).