Pip Python package manager commands

Useful commands for Pip (this is not usually pre-installed on Raspbian) are listed as follows:

  • To install Pip or Python 3, use the sudoapt-get install python3-pip command
  • Install the required package using sudo pip-3.2 install <packagename>
  • Uninstall a particular package using sudo pip-3.2 uninstall<packagename>
  • To find out the version of an installed package, use pip-3.2 freeze | grep <packagename>
  • Install a specific package version using sudo pip-3.2 install <packagename>==<version>

For example, to check the version of Pi3D installed on your system, use pip-3.2 freeze | grep pi3d.

To replace the installed version of Pi3D with Version 2.13, use sudo pip-3.2 uninstall pi3d and sudo pip-3.2 install pi3d==2.13 ...

Get Raspberry Pi 3 Cookbook for Python Programmers - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.