how to install library for particular version of python code example
Example 1: update pip
sudo pip3 install --upgrade pip
Example 2: upgrading a pip package while importing it
pip install [package_name] --upgrade
sudo pip3 install --upgrade pip
pip install [package_name] --upgrade