Quantcast
Channel: How to link WSL to my already installed python on windows? - Ask Ubuntu
Viewing all articles
Browse latest Browse all 3

Answer by steeldriver for How to link WSL to my already installed python on windows?

$
0
0

As explained in Windows Subsystem for Linux interoperability with Windows, there are some conditions that need to be satisfied in order to execute Windows programs from the WSL command line:

Run Windows tools from WSL

WSL can invoke Windows binaries directly from the WSL command line using [binary name].exe. For example, notepad.exe. To make Windows executables easier to run, Windows path is included in the Linux $PATH in Fall Creators Update.

Some irrelevant stuff omitted

Windows binaries must include the file extension, match the file case, and be executable. Non-executables including batch scripts. CMD native commands like dir can be run with cmd.exe /C command.

So, if your Windows version of python3 is a regular executable, you should be able to run it as

python3.exe

Otherwise (apparently this includes the version of python3 installed to WindowsApps from the Microsoft store) you will need to use

cmd.exe /C python3.exe

Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>