Pivotal Knowledge Base


gpload Unable to Import the PyGreSQL Python Module (pg.py)


  • Pivotal Greenplum Database (GPDB) 4.3.x
  • Operating System- Red Hat Enterprise Linux (RHEL) 6.x


When gpload is installed on a new system, and the following error is displayed, saying python modules are missing, this resolution should help.

Error Message

gpload.py -v 
gpload was unable to import The PyGreSQL Python module (pg.py) - No module named pygresql


Most likely, the greenplum_loaders_path has not been sourced correctly.


1. Find the greenplum_loader_path.sh

find / -name greenplum_loaders_path.sh

2. Source the greenplum_loaders_path.sh file

source /usr/local/greenplum-loaders-

Additional Information 

After sourcing the path, there may be further errors such as:

'import site' failed; use -v for traceback 
gpload needs pyyaml.

This may be caused by other incorrect configurations in the user environment. Some troubleshooting steps to help resolve this include:

  • Review the .bashrc script for the user and look for different python paths that may be loaded.
  • Create a new Linux user, log in as that user, source the greenplum_loaders_path.sh file and try again. 



Powered by Zendesk