`install_types` always calls `sys.executable` and is therefore not compatible with a custom executable: https://github.com/python/mypy/blob/1bf701f82fe94a07cc61a9e683a1fe29a907dd53/mypy/main.py#L1162 The solution would be to pass `options.python_executable` from `main`.
install_typesalways callssys.executableand is therefore not compatible with a custom executable:mypy/mypy/main.py
Line 1162 in 1bf701f
The solution would be to pass
options.python_executablefrommain.