0

I have big project with C# and WinForms on Windows 10. I want to run from this program python script with ML libraries. Unfortunately i have some problems with work ML in native on Windows and want use WLS2 with Linux environment. It's real? How I should execute python script under WLS2 from C# under Windows10? Can it have access to MS SQL local server under Windows?

Denis Savenko
  • 829
  • 1
  • 13
  • 29

1 Answers1

0

You can totally use WSL for your development. Your best option would be to use VS Code with remote extension for WSL. See the doumentation. enter image description here

Sajjad Bay
  • 197
  • 2
  • 9
  • Thank you, but question how i should and better do it. I should run bash.exe from C#? Or cmd.exe, or use something else. How i can execute python script that get data from my windows machine with MS SQL? – Denis Savenko Oct 22 '20 at 05:52
  • 1
    You can run wsl to get to wsl bash then call your python script if you want to do this within your code. For database I suggest you run your database on Docker and mount your volume to either your windows or WSL filesystem. If not you need to use IP address of your windows machine if you want to access any service running on windows from within WSL. Look at the [documentation] (https://learn.microsoft.com/en-us/windows/wsl/compare-versions) – Sajjad Bay Oct 22 '20 at 06:15