pip update a python package code example
Example 1: how to update pip python
python -m pip install --upgrade pip
Example 2: how to update a module in python
pip install [package] --upgrade
Example 3: upgrading a pip package while importing it
pip install [package_name] --upgrade