To use pic32prog, the PICkit3 must be updated with a scripting mode firmware. This describes how to do it on Linux using a windows VM (free).