pip upgrade lib to specific version code example
Example 1: pip upgrade package
pip install Django --upgrade
Example 2: upgrading a pip package while importing it
pip install [package_name] --upgrade
pip install Django --upgrade
pip install [package_name] --upgrade