Python in lammps

i have build python3.6 in lammps, and it works. now i want to change to python3.9 in lammps, what should i do?

There is not enough information here to make any meaningful suggestion beyond “follow what is written in the documentation”.

Please see the similar current topic: How to build python3.10 in lammps