Error when running python as a non-root user

I have python3.6 installed on my system with Redhat 7.9. While as root user I do not get any error with python3. Normal users who are not root users get the following error message when they want to run python3. I uninstalled python3.6 and reinstalled it but the problem is not solved. There is no problem as root, could it be a problem with permission? How can I solve this problem?

Error
" python3: symbol lookup error: python3: undefined symbol: _py_legacylocaledetected "

thankyou for support.

Make sure that you are running the same program as each user.
Use which to find the path of the python3 you are running in each case.
Try running python3.6 using a full path like /usr/bin/python3.6 does that always work?

Try comparing ‘ldd $(which python3.6)’ between an account that works (root), and an account that doesn’t.

Also, perhaps try:
https://stromberg.dnsalias.org/~strombrg/env-search.html
It’ll do a linear search on your environment variables, to see which of them is causing a problem - if any. Sometimes it’ll turn out to be $HOME or $LD_LIBRARY_PATH, for EG.