Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use MSYS2 Python interpreters in Windows for interactive development #22277

Closed
dafred94 opened this issue Oct 21, 2023 · 2 comments
Closed

Use MSYS2 Python interpreters in Windows for interactive development #22277

dafred94 opened this issue Oct 21, 2023 · 2 comments
Labels
area-environments Features relating to handling interpreter environments feature-request Request for new features or functionality

Comments

@dafred94
Copy link

dafred94 commented Oct 21, 2023

I want to use a Python executable shipped with MSYS.
A terminal can be opened as explained here by appending this to settings.json:

"terminal.integrated.profiles.windows": {
        "MSYS2 UCRT": {
            "path": "cmd.exe",
            "args": [
                "/c",
                "C:\\msys64\\msys2_shell.cmd -defterm -here -no-start -ucrt64"
            ]
        }
    }

Since I want to use tools that can be installed in MSYS from a Python shipped with MSYS2 (in my case "rsync"), I figured that it would be nice to use that interpreter directly in VSCode to execute files e.g. line by line from the editor.

So I tested the following commands as a "custom Python interpreter":
C:\\msys64\\msys2_shell.cmd -defterm -here -no-start -ucrt64 -c "python"
and
cmd.exe /C "C:\\msys64\\msys2_shell.cmd -defterm -here -no-start -ucrt64 -c "python""

I had no luck, whatsoever. When I use that line on cmd.exe, the correct MSYS2 Python executable is launched.

Workaround:

  1. start a working Python interpreter
  2. enter "quit()" to enter its connected cmd prompt
  3. enter the C:\\msys64\\msys2_shell.cmd -defterm -here -no-start -ucrt64 -c "python" from above
  4. it now works

But that workaround is pretty annoying..
Am I doing something wrong here? Or could my workaround be streamlined / be made unneccessary?

@dafred94 dafred94 added the feature-request Request for new features or functionality label Oct 21, 2023
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Oct 21, 2023
@karthiknadig karthiknadig added the needs community feedback Awaiting community feedback label Oct 23, 2023
@github-actions
Copy link

Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.

@karthiknadig karthiknadig added area-terminal area-environments Features relating to handling interpreter environments and removed triage-needed Needs assignment to the proper sub-team area-terminal labels Oct 23, 2023
@brettcannon
Copy link
Member

Thank you for submitting your feature request and everyone who considered it! Unfortunately, this issue did not receive enough votes over the allotted time, and so we are closing the issue.

@brettcannon brettcannon closed this as not planned Won't fix, can't repro, duplicate, stale Jan 11, 2024
@github-actions github-actions bot removed the needs community feedback Awaiting community feedback label Jan 11, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants