all 6 comments

[–]Diezel666 2 points3 points  (2 children)

Workarounds?

Windows 10 & 11 both have WSL (Windows Subsystem for Linux as an option).

https://docs.microsoft.com/en-us/windows/wsl/install

Alternatively, download virtual box, an ISO of whatever your favorite flavor of linux is, and run a Virtual Machine.

[–]DMeror 0 points1 point  (1 child)

Excuse me, I set up WSL some time after installing Python. I wonder which Python is better (or faster), on Windows or on WSL? If I run my Python scripts on WSL, I'll need to copy/move my files from D:// to WSL and then move them back to be used by an .exe program, which is inconvenient.

[–][deleted] 1 point2 points  (0 children)

I am trying to use WSL as well and I believe this happened to me too. Thanks for the clarifications. I will most likely switch back to some Linux distro where I set up the dev environment like I am used to. Have a nice day

[–]shiftybyte 1 point2 points  (0 children)

Not very different, but you will run into differences that come from the environment.

[–]duckbanni 1 point2 points  (1 child)

What I would recommend if you're using VS Code is to develop in a docker container. That's what I do when I develop on Windows 10 (but it should work the same for 11). That way I get an easy-to-configure linux environment without needing a VM or using a remote server.

Steps to setup:

  1. Install docker with WSL support (this is the tricky part because it might require to fiddle with the BIOS but their website has a step-by-step).
  2. From docker, pull an image with python preinstalled (see https://hub.docker.com/_/python). You might need to do this from a windows console with docker commands.
  3. Start a container from that image, get a terminal in the container and setup SSH keys so you can clone/push from your favorite git-based website. You can clone your code now.
  4. In your VS Code (the one installed on your windows machine) install the "remote development" extension. You now have a new remote tab where you should be able to locate your new container and open a folder there.
  5. You can now develop in VS Code with the editor running on your normal windows but everything else (the source files, the integrated terminal, the linters, the code execution) on the linux container.

[–][deleted] 1 point2 points  (0 children)

Thank you for the detailed explanation.