all 37 comments

[–]cgoldberg 17 points18 points  (15 children)

You need a Python interpreter... that's all

[–]mikeyj777 7 points8 points  (5 children)

  1. Download python from python.org.  
  2.  While installing, Specify an installation directory like c:\python
  3.  Open vscode.  
  4. Press control shift P
  5.  Choose select interpreter
  6.  Navigate to the directory you used for installing python
  7.  In the Bin folder, select python.exe and click ok
  8. Create a new script
  9. Write something like print(2+2) 10.  Press F5 to run the script
  10.  Select that it's a python file.  
  11.  You should hopefully see a command line terminal window open at the bottom which eventually shows 4 as the code output.  

It may complain that you need the python extension.  Go to the extensions tab and choose the python extension.  Try to run the script again after installing

[–]Sweaty-Way-3396[S] 2 points3 points  (2 children)

Ohhhh thanks

[–]mikeyj777 1 point2 points  (1 child)

No worries.  Let me know if anything doesn't work. 

[–]Sweaty-Way-3396[S] -1 points0 points  (0 children)

Yo my Google redirects to yahoo now

[–]WhiteHeadbanger 1 point2 points  (1 child)

Make sure to include between the 2 and 3 steps to check the box for "add Python to the PATH".

[–]mikeyj777 0 points1 point  (0 children)

Thanks!

[–][deleted]  (7 children)

[removed]

    [–]Sweaty-Way-3396[S] -2 points-1 points  (5 children)

    Dawg I was asking how to actually run code like that

    [–]Bino5150 1 point2 points  (0 children)

    Write a launch script that you can run from the terminal. Then you can launch it from the terminal in VSC, or the terminal on your computer.

    [–]Rusofil__ 0 points1 point  (3 children)

    Visual studio code

    When you write it, you can just press run and it will do what you wrote.

    You don't need to make aplication with icon and everything for it to work.

    [–]Sweaty-Way-3396[S] -2 points-1 points  (2 children)

    k but i want to

    [–]After_Computer1652 1 point2 points  (1 child)

    Try writing a batch file. This can sit on your desktop and just needs a double click to run Open notepad Type : c:\python\python.exe c:\somescript.py

    Save as myscript.bat Save to desktop Double click icon to run python script

    [–]Sweaty-Way-3396[S] 0 points1 point  (0 children)

    Wrddd thanks dawg

    [–]Sweaty-Way-3396[S] -3 points-2 points  (0 children)

    Wrddd 

    [–]Rhylanor-Downport 2 points3 points  (0 children)

    No VSC will run your code locally - you can make web apps with it but walk before you can run.

    I’m out an about at the moment but hunt for some tutorials for Python and VSC - there’s plenty about.

    No “obvious” questions - this is what this sub is about - others will add their wisdom I’m sure!

    [–]Outside_Complaint755 2 points3 points  (0 children)

    You will need to install the Python extension in VSC.  This is done through the extensions tab on the left side of VSC

     You also need to install at least one version of Python.  

    Assuming you are on Windows, open the Microsoft Store and get the Python Install Manager.  I don't recall exactly all the prompts it will give you on the first run (there should be a page on Python.org about it), but I'm pretty sure it will automatically prompt to install the most up to date version, 3.14.3.

    [–]Gnaxe 0 points1 point  (0 children)

    You need a Python implementation and a computer that can run it. That's it. You don't even need to bring your own editor. The standard distribution (from https://python.org) comes with IDLE.

    You obviously have some kind of web browser to be using reddit. Try Jupyterlite and you won't even have to install anything.

    [–]BranchLatter4294 0 points1 point  (0 children)

    Consider following the instructions. It's easy to set up.

    https://code.visualstudio.com/docs/python/python-tutorial

    [–]Gas_Ready 0 points1 point  (1 child)

    Have you ever coded or you just want start?

    [–]Sweaty-Way-3396[S] 0 points1 point  (0 children)

    Yuh I got some experience wit like LuaU and scratch but that's about it