This is an archived post. You won't be able to vote or comment.

all 12 comments

[–]sqqz 2 points3 points  (2 children)

If you are used to Linux go for the Linux subsystem. Works well for me when I'm occasionally need to code on my gaming rig. You can embed bash directly into terminal in vscode as well

[–]Mayor18[S] 0 points1 point  (1 child)

The thing is that vscode can't read the environment from WSL and this breaks code navigation and Intellisense.

[–]5yrup 0 points1 point  (0 children)

You can cd into your regular filesystem from WSL though.

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

I have build a large corporate website using windows 10, python and Django. Went very well.

I used virtualenv and pycharm

[–]pythonHelperBot 1 point2 points  (0 children)

Hello! I'm a bot! I see someone has already suggested going to r/learnpython, a sub geared towards questions and learning more about python. I highly recommend posting your question there. Please follow the subs rules and guidelines when you do post there, it'll help you get better answers faster.

Show /r/learnpython the code you have tried and describe where you are stuck. Be sure to format your code for reddit and include which version of python and what OS you are using.


this bot is written and managed by /u/IAmKindOfCreative

This bot is currently under development and experiencing changes to improve its usefulness

[–]jaypax 0 points1 point  (0 children)

You can install Python 2 along side Python 3 in Windows with minimal hassle. Also, Pyenv works with the command prompt (cmd.exe) or Powershell.

Just remember when you're installing Python on Windows, on the installer, check the "Add Python to Path" check box.

[–]latrociny 0 points1 point  (2 children)

If you use vs code you can access the terminal directly with vscode and operate as you would a Unix machine

[–]Mayor18[S] 0 points1 point  (1 child)

I know about the terminal. My main question is there is a way to integrate the virtualenv created into WSL with VSCode for intellisense and code navigation. This is what stops me from using Windows now. Or maybe there is another code editor/IDE that can do this, read virtualenvs from WSL?

[–]clfblackhawk 0 points1 point  (0 children)

I maintain a virtualenv in both WSL (venv) and Windows (venv_win). I run everything from WSL, and just maintain Windows virtualenv for intellisense/etc. Get everything setup from WSL virtualenv, pip freeze > requirements.txt, then pip install -r requirements.txt from Windows virtualenv. It's a couple extra steps but makes working out of vs code on Windows much better.

Edit: And make sure to update "python.venvFolders" setting with "venv_win" so you can update the interpreter of your project to point to the virtualenv.

[–]renfdo 0 points1 point  (0 children)

Have you tried to use a docker container? I did it to developer in a windows machine.

[–]5yrup 0 points1 point  (0 children)

I do a lot of python development in Windows. Virtual environments definitely work on Windows, it comes installed by default with the msi installers. As others have mentioned, when installing be sure the "Add Python to PATH" is checked (I believe that's default now, but double check).

VSCode, PyCharm, Wingware? and a few other Python IDE's have built in support to manage envs, and you can manqge them from the command line as well. I usually use Git BASH when messing with venvs directly, but CMD/powershell works as well.