Fix Git 'index.lock' File Exists Error on Linux - Fix Python UnicodeDecodeError with errors='ignore'-Install Python Packages Without Sudo

Result check
- Keep one change per test run so you know which step helped.
- Undo temporary changes after the issue is confirmed.