Use pip list
to list all packages and their versions. You can pipe it to grep to search for the package your interested in:
pip list | grep sympy
Alternatively to get all information about that package including version you can use pip show
:
pip show sympy
To upgrade it's simply:
pip install --upgrade sympy
If you need write permissions to your python installation directory don't forget to prepend the pip install
command with a sudo
: e.g. sudo pip install --upgrade sympy