check the version of a package pip code example
Example 1: check package version python
import packagename
print(packagename.__version__)
Example 2: python pip version check
pip --version
import packagename
print(packagename.__version__)
pip --version