Ad Widget

Collapse

zabbix remote command running python script throws import error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dheerajr
    Junior Member
    • Jan 2021
    • 3

    #1

    zabbix remote command running python script throws import error

    #!/usr/bin/env python3
    # coding: utf-8

    import sys
    sys.path.append('/home/ubuntu/.local/lib/python3.6/site-packages/boto3')
    import boto3

    executing script from remote command throws no module boto3. but package is already installed.
  • dheerajr
    Junior Member
    • Jan 2021
    • 3

    #2
    Fixed. needed to copy packages from /home/ubuntu/.local/lib/python3.6/site-packages/ to /usr/local/lib/python3.6/dist-packages/ to make it work.

    Comment

    Working...