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

Make Python/PySys detection more reliable #21

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rsm31
Copy link

@rsm31 rsm31 commented Dec 23, 2020

Hey John, here's my attempt to fix an issue (#22) I hit using the plugin with a remote WSL2 Ubuntu 18.04 environment, where it failed to find a Python installation despite there being at least two of them on the path. There were two different problems:

  1. All the Pythons I have print Python x.y.z in response to -V so we probably need to look for ython as well as ersion in the output.
  2. The get("interpreter_path","na") was returning an empty string rather than na. No idea why, but I bodged in a check for that anyway.

It seems to work for me now but given that my knowledge of TypeScript is near-zero and of VS Code extensions even less, I have probably missed the real problem and/or implemented the fix in a horrible way. Hopefully this is some use regardless.

Cheers,

Scott

- Check for empty interpeter_path config as well as the default value
- Check for version information of the form "Python x.y.z"
@CaribouJohn CaribouJohn linked an issue Dec 27, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python version parsing might be broken
1 participant