On 8/1/21 7:40 AM, Ganesh Korde wrote:
Hi Everyone,

Environment
OS : Linux ubuntu 4.4.0-87-generic
Database:  PostgreSQL 10.7 on x86_64-pc-linux-gnu,
Extension: plpython3u
Python version: Python 3.5.2

 I am trying to run a python function using the language plpython3u and I am getting the below error, though I have installed psutil.

postgres=# select * from get_psutil_mem();
ERROR:  ImportError: No module named 'psutil'
CONTEXT:  Traceback (most recent call last):
   PL/Python function "get_psutil_mem", line 2, in <module>
     from psutil import virtual_memory, swap_memory
PL/Python function "get_psutil_mem"


The above function is used by pgwatch2 to monitor memory.

*I tried installing python3.4.3 from source code but still the same error.* Also tried most of the solutions provided on the internet but nothing helped. Problem is with the psutil module only.

Please let me know if I am missing anything.

How did you install plpython3u?

How did you install psutil?


Any help will be much appreciated.

Regards,
Ganesh Korde.


--
Adrian Klaver
adrian.kla...@aklaver.com


Reply via email to