Error compiling code for pi pico

Hi all, I am trying to compile a sketch for pi pico on Arduino 1.8.19, i have recently installed and reinstalled Python 3.11.5 at the request of ai, adding and checking all recommended paths in windows 10, but still get the following error:

Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'

The Boards file is up to date as of today as are all libaries. Am I missing something in IDE config?

This is already under File>Prefs>Additional board mamger URLs:

(https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index)

Many thanks
Andy

This would be better seen on the arduino-pico GitHub repo but it's an occasional issue seen under Windows. For some reason the uninstall/reinstall for an upgrade of the shipped Python interpreter fails silently leaving files missing. Not sure what junk AI would spit out about that, but installing Python yourself in the OS would not make a difference on Windows.

See File not found after updating to version 4. · Issue #2355 · earlephilhower/arduino-pico · GitHub for a workaround.