Symptoms:
- Unable to run a previously working VSCode project after upgrading to Windows 11.
- VSCode does not recognize the pxz module, despite specifying the PythonPath for the Pxz SDK API bin.
- Encountering ModuleNotFoundError: No module named 'pxz' error message.
Cause:
The VSCode settings for the Python interpreter may have been reset or lost during the OS migration.
Resolution:
Correct VSCode Interpreter Settings
- Ensure that VSCode is using the correct Python interpreter. Set the interpreter to use the virtual environment (.venv) instead of the global one.
- To set the interpreter:
- Open VSCode.
- Press
Ctrl+Shift+P
to open the Command Palette. - Type
Python: Select Interpreter
and select the interpreter from the.venv
environment.