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

Filter out .exe interpreters on WSL #77

Merged
merged 1 commit into from Jul 13, 2019
Merged

Filter out .exe interpreters on WSL #77

merged 1 commit into from Jul 13, 2019

Conversation

frostming
Copy link
Member

On WSL pythonfinder will find interpreters on Windows and may pick from them, while not working at all.

Related issue: pypa/pipenv#3807

@techalchemy
Copy link
Member

seems good to me, what shows up as os_name on WSL?

@techalchemy
Copy link
Member

someday I'll get a computer with windows 10

@frostming
Copy link
Member Author

seems good to me, what shows up as os_name on WSL?

Just the same as a normal *nix system: posix

@uranusjr
Copy link
Member

uranusjr commented Jul 12, 2019

I need to check later, but IIRC Linux (ELF) Python installations report posix, but Windows Python installations (python.exe) report nt.


Edit: yup

$ /home/uranusjr/.local/share/pythonup/cmd/python3.6 -c 'import os; print(os.name)'
posix
$ /mnt/c/Users/uranusjr/AppData/Local/Programs/Python/Python36/python.exe -c 'import os; print(os.name)'
nt

@techalchemy
Copy link
Member

I need to check later, but IIRC Linux (ELF) Python installations report posix, but Windows Python installations (python.exe) report nt.

So the implication here is that it's definitely appropriate to exclude things with an exe extension when running inside WSL

@techalchemy techalchemy merged commit 1bd5714 into master Jul 13, 2019
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.

None yet

3 participants