Changes: - Add fix_python_association.cmd to fix .py file association - Update README with Windows Store Python troubleshooting section - Update Node Mappings section to reflect auto-discovery from .gitmodules - Script now uses C:\Python312\python.exe for file associations The Windows Store Python issue: - Windows Store installs Python "stubs" in WindowsApps folder - These stubs take precedence over real Python installations - Running .py files directly uses stubs (wrong Python) - Running 'python script.py' uses PATH Python (correct) Three solutions provided: 1. Fix file association with provided batch script (recommended) 2. Disable Windows Store Python stubs in Settings 3. Always prefix with 'python' command (workaround)
33 lines
794 B
Batchfile
33 lines
794 B
Batchfile
@echo off
|
|
REM Fix Python file association to use C:\Python313 instead of Windows Store stub
|
|
REM Run this as Administrator
|
|
|
|
echo Current Python file association:
|
|
assoc .py
|
|
ftype Python.File
|
|
|
|
echo.
|
|
echo Fixing Python file association to use C:\Python312...
|
|
echo.
|
|
|
|
REM Associate .py files with Python.File type
|
|
assoc .py=Python.File
|
|
|
|
REM Set Python.File to use C:\Python313
|
|
ftype Python.File="C:\Python312\python.exe" "%%1" %%*
|
|
|
|
echo.
|
|
echo New Python file association:
|
|
assoc .py
|
|
ftype Python.File
|
|
|
|
echo.
|
|
echo Done! Now .py files will use C:\Python312\python.exe
|
|
echo.
|
|
echo You may also want to disable Windows Store Python stubs:
|
|
echo 1. Open Windows Settings
|
|
echo 2. Go to Apps ^> Apps ^& features ^> App execution aliases
|
|
echo 3. Turn OFF both "python.exe" and "python3.exe" toggles
|
|
echo.
|
|
pause
|