VMware Tanzu Greenplum

 MadLib on Greenplum 6.21.1 throwing error, "No Module Named: Numpy"

V Pemberton's profile image
V Pemberton posted Aug 09, 2022 10:08 AM

Hello, we've been playing around with MadLib on our Greenplum 6.21.0 cluster, and we keep getting an error as follows:

 

SQL Error [XX000]: ERROR: ImportError: No module named numpy (plpy_elog.c:121)

 

Python is not installed at all on any of the instances, so I wasn't sure what to do about this. I've gone ahead and installed python2-numpy & python3-numpy on all instances, but the error still remains, even after full instance reboots.

 

Considering that it is all SQL, I am honestly a bit stuck as to how to fix this - I assumed MadLib would be embedded with requirements, but apparently not. Anyone any ideas?

 

Cheers,

Vinny

V Pemberton's profile image
V Pemberton

To confirm: GPDB 6.21.0 is correct, I mis-typed in the title!

David Reynolds's profile image
David Reynolds

ou can simply use

 

pip install numpy

Or for python3, use

 

pip3 install numpy

Myherbalife

V Pemberton's profile image
V Pemberton

Hi @David Reynolds​ , thanks for the response. Unfortunately, as mentioned above, Numpy was already installed. I did, however, go and install python3 on the off-chance it needed Python on the system, but then installing Numpy claimed, as expected, that the package was already installed.

 

I re-ran the code, but the same error is still returned. Considering that MatLib seems to use its own embedded python as required, perhaps I need to do a sym-link from the numpy package to somewhere in the Greenplum directory so it knows it exists, or something?? Grasping at straws.