Pymavlink, mavkml.py error

hi guys, so I tried installing mavproxy, followed all the steps (using pip3)

but I still cannot run mavproxy.py. I got :command not found.
and so I tried mavtogpx.py and my bin file, and it requested me to also install python3-pymavlink.

installed pymavlink, ran mavtogpx and got success. tried running mavproxy.py still got me to command not found. (but it is there in home/.local/bin and also added to PATH). anyway it might say that because I dont input the argument? however mavtogpx.py turned green (runable command in my szh) after space, but not mavproxy.py.
decided to skip this all because my current priority is mavkml.py. so I installed pip simplekml and ran mavkml.py and now I got this error :

Processing 00000001.BIN
Traceback (most recent call last):
  File "/home/stoneddawg/.local/lib/python3.9/site-packages/pymavlink/DFReader.py", line 190, in __getattr__
    i = self.fmt.colhash[field]
KeyError: 'MainState'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/mavkml.py", line 201, in <module>
    process_file(f, args.source)
  File "/usr/local/bin/mavkml.py", line 154, in process_file
    add_data(tdays, msg, msg_types, mlog.messages, fields, field_types, position_field_type)
  File "/usr/local/bin/mavkml.py", line 61, in add_data
    v = mavutil.evaluate_expression(f, vars)
  File "/home/stoneddawg/.local/lib/python3.9/site-packages/pymavlink/mavutil.py", line 59, in evaluate_expression
    return mavexpression.evaluate_expression(expression, vars, nocondition)
  File "/home/stoneddawg/.local/lib/python3.9/site-packages/pymavlink/mavexpression.py", line 42, in evaluate_expression
    v = eval(expression, globals(), vars)
  File "<string>", line 1, in <module>
  File "/home/stoneddawg/.local/lib/python3.9/site-packages/pymavlink/DFReader.py", line 192, in __getattr__
    raise AttributeError(field)
AttributeError: MainState

im not gonna use APM Planner 2, because the “convert to KML” is also producing bad KML even though it was successful. also I tried mission planner in mono but it crashes when converting .bin to KML or KMZ.

I don’t mind with using command line tools to set my params and post flight tools, but im so confuse which is to install? mavproxy or pymavlink? or both? and how is the complete setup should be?

edit : solved the command not found issue(its path is in bashrc not zshsrc…) but not the mavkml issue…

additional question too, pip/pip3 installed mavproxy and pymavlink to /usr/.local, but the mavproxy guide in ardupilot.org was pointing to $Home/.local, and i have mavproxy.py and all the other script in both directory now, which one is the correct one?