Python and TensorFlow Installation

<< Click to Display Table of Contents >>

Navigation:  Installation of PAI Infrastructure > Linux Platforms >

Python and TensorFlow Installation

Python version 3.8 is required. Install Python, TensorFlow and Scikit-Learn as follows:

sudo apt update

sudo apt upgrade

sudo apt install build-essential

sudo apt install python3

sudo apt install python3-pip

pip3 install -U pip

pip3 install -U tensorflow==2.10.0

pip3 install -U scikit-learn

Install PyTorch either for CPU only:

pip3 install -U torch

or install PyTorch for GPU:

 pip3 install -U torch --extra-index-url https://download.pytorch.org/whl/cu116

 

Note: TensorFlow can alternatively be installed in Python’s virtual environment. scikit-learn can be tested using the command: python3 -c “import sklearn; print(sklearn.__version__)”