Getting Started with Python in Visual Studio Code

Sdílet
Vložit
  • čas přidán 22. 07. 2024
  • In this episode, Robert is joined by Tyreke White, who shows us how to get started with Python development using Visual Studio Code. He covers what you need to install and how to configure your environment, as well as sharing tips on how to debug your Python code.
    Resources:
    Getting started: aka.ms/vst/pythonvscode
    Follow our blog: aka.ms/pythonblog
    Follow us on Twitter: @pythonvscode
    Demo code (github.com/Anapo14/sentimentapi)
  • Věda a technologie

Komentáře • 128

  • @roastedpeanuts1994
    @roastedpeanuts1994 Před 3 lety +97

    Dear Microsoft, timestamps for each of the topics would be very helpful.

  • @tjmoncur0231
    @tjmoncur0231 Před 3 lety +24

    I like how he was obviously instructed to use Edge, but wasn't told to take his Apple Watch off before recording.

  • @boknows8263
    @boknows8263 Před 2 lety +1

    I begin to learn Python and come across VS code, spent some time and didn't figure out how to set up VM and install python packages in VS code. after wathing this video, I figured them all out.
    I am up and running Python in VS code. thanks a lot for this video!

  • @lwa.dev74
    @lwa.dev74 Před 3 lety +1

    Great presentation of Python 3 in action inside VS Code :-) this Guy "Tyreke White" made learning about Python really interesting... so much so I decided too install python 3 inside kali linux running vs code... really want to learn more about this language... Amazing!!!

  • @romulobrandino
    @romulobrandino Před 4 lety +97

    11:00 creation of virtual environment.
    14:15 how to activate the virtual environment in Windows.

  • @ali_alami
    @ali_alami Před 4 lety +153

    no one :
    literally no one :
    the python guy : cool awesome

  • @artemburov9456
    @artemburov9456 Před 2 lety

    Thanks for the great video! Clear and simple to start working with Python in VS Code.

  • @kevinh21labs
    @kevinh21labs Před 3 lety +5

    make sure you tell people to select the terminal option in the debugger window. And then select the new command prompt option. Powershell is not configured to run scripts by default. (14:25)

  • @georgegikwa7387
    @georgegikwa7387 Před 4 lety

    When i type if else statement in my python vscode it brings for me a bunch of code nearly 300lines

  • @sdwaltersumajit2138
    @sdwaltersumajit2138 Před 4 lety

    Helpful. Useful. Thank you for sharing.

  • @llihak
    @llihak Před 4 lety

    what are the other extensions you have? particularly, the ones above and below the extensions icon. thanks, and thanks for this clear tutorial.

  • @josephammar800
    @josephammar800 Před 2 lety +1

    Hello, when I add a venv. and then click yes for the popup notification, the vscode does not appear in my folder vstools. How can I fix it ?

  • @mesetarioalcarreno5762

    Virtual environment es una caracteristica increíble, me flipa lo bien lograda que está.

  • @karelvanderwalt3625
    @karelvanderwalt3625 Před 4 lety +1

    The menubar on top and the status bar at bottom are both 'Toolbars'? And the Icons are also known as Badges?

  • @jaseemj313
    @jaseemj313 Před 4 lety +1

    I opening visual studio code in my laptop it appear complete black can anyone help me to solve the problem

  • @raulalejandromunozaraya3878

    I love these videos, the icons are so nice

  • @brock2k1
    @brock2k1 Před 4 lety +42

    "Getting Started" should show stuff common to new users, not some very narrow project that 99% of people aren't interested in.

  • @blo0buryz__745
    @blo0buryz__745 Před 3 lety +3

    This was no help. I still can't get it to let me write code.

  • @_matis_
    @_matis_ Před 4 lety +10

    Just to provide some feedback.I am pretty new to programming and seeing things typed in terminals and cmd confuses me a bit.I think that most noobs are more the visual learner type where they click something and stuff happens.Once you want speed and efficiency i guess people start to use commands.So if this is for experienced folks i think this might be a good tutorial.For beginners like me,it is a bit too much black screen with white letters :).I just came from jupyter notebook searching for a new enviroment to code,many people praised vs code and i see why.But the problem is that it has a bit of an "unfriendly" vibe for me (even though i like the look of the program),like there are so many things to setup,so many things to type using cmd ect....So i am not trying to bash you guys,just providing some feedback.Keep up the work.Thank you

    • @LittleJacob1985
      @LittleJacob1985 Před 3 lety

      If you want something which has less things to setup and is good to go out of the box then try Thonny ( thonny.org ).

  • @shrikantvaishnav1077
    @shrikantvaishnav1077 Před 4 lety +1

    Very Informative..

  • @abhimavila
    @abhimavila Před 4 lety

    Were do i get the requirement. Txt

  • @mrmuranga
    @mrmuranga Před 4 lety +3

    Very engaging...thanks

  • @kevinh21labs
    @kevinh21labs Před 3 lety +1

    I may be mentally deficient, but where did the sentimentapi file (13:30) come from? How do I follow without the sample file? Why is it so hard to learn a so-called easy language? I was doing great up to that point. Darn.,

  • @PALTUBABY
    @PALTUBABY Před 4 lety

    very nice explanation with good demos. I learn from it and also tried hands-on. worked well. Thank you :)

  • @Lord_Liverpool
    @Lord_Liverpool Před rokem

    Great video, thank you!

  • @Solaricusml
    @Solaricusml Před 3 lety

    Perfect, i am already coding using Linkedin course

  • @Dmitrievsky
    @Dmitrievsky Před 3 lety

    Hi, I have a little problem. Python decorators doesn't work in vscode, bot work in vscode jupyter. Do you know how to fix it?
    Example:
    #Decorator are just function that take function as first
    #parameter and return a function
    def logging(f):
    def decorator_function(*args, **kwargs):
    print('executing '+f.__name__)
    return f(*args, **kwargs)
    return decorator_function
    #Use it like this
    @logging
    def hello_world():
    print('Hello World')
    hello_world()
    returns an error:
    >>> def logging(f):
    ... def decorator_function(*args, **kwargs):
    ... print('executing '+f.__name__)
    ... return f(*args, **kwargs)
    ... return decorator_function
    ... #Use it like this
    ... @logging
    File "", line 7
    @logging
    ^
    SyntaxError: invalid syntax

  • @Christobanistan
    @Christobanistan Před rokem

    We need an updated version of this showing how to do the virtual env stuff without resorting to the command line. Surely the tooling has caught up!

  • @theobellash6440
    @theobellash6440 Před 2 lety

    Best ever extensions, was already using these.

  • @hawlkman
    @hawlkman Před 11 měsíci

    For some reason the .vscode file never appears for me :(

  • @bradleesargent
    @bradleesargent Před 4 lety +2

    In linux to activate an environment I used "source vstoolbox/bin/activate"

  • @cong0929
    @cong0929 Před 4 lety +1

    Cool! very clear voice to understand!!

  • @vibdib
    @vibdib Před 4 lety +29

    Is there any difference between python in vs code and python with visual studio community, professional or Enterprise edition

    • @ggcmod
      @ggcmod Před 4 lety +2

      There should be no differences, since in fact you have to install Python in addition to VSCode so it is independent of the use of VSC, this is just a tool to write Python.

    • @brunoillipronti8641
      @brunoillipronti8641 Před 4 lety +5

      Thats a nice question. Specially because people dont wanna move from PyCharm and Microsoft has potential to overcome the features with VS Pro

  • @48nakul
    @48nakul Před 4 lety +2

    this is some good stuff right here

  • @ospfmon
    @ospfmon Před 4 lety

    Cool. Nice to start with

  • @N0__Name__
    @N0__Name__ Před 3 lety

    i wanted to learn to write python using vscode... u took all my interest in even trying...

    • @akin242002
      @akin242002 Před 3 lety

      Don't give up. Start with the basics and then gradually progress. This guy in the video went straight to intermediate level concepts.

  • @stevezelazny9946
    @stevezelazny9946 Před 3 lety +1

    More of a marketing "look how great we are" than a true getting started video.

  • @YigalBZ
    @YigalBZ Před 3 lety

    A question if I may (or guide me to a forum): I am trying to learn ML object detection with VScode & Python. I have a lot of experience with VSCODE with Arduino/ESP, but first time into python. My first import is for Pandas. Pip install pandas seems to work, but when I run debug, I get "Exception has occurred: ModuleNotFoundError
    No module named 'pandas'" . Any idea?

    • @YigalBZ
      @YigalBZ Před 3 lety

      Ignore it - solved with VScoer restart. Still asking: is there a good forum to use with such questions?

  • @leeeric6292
    @leeeric6292 Před rokem

    VScode top 3 for python developers only? Please tell me top 1 and top 2. Thanks.

  • @Gglsucksbigballz
    @Gglsucksbigballz Před 4 lety +5

    It’s done something Magical! It’s hit a breakpoint!

  • @praveenkumargr4772
    @praveenkumargr4772 Před 4 lety

    really nice explanation.. now i know how to use VS code for python development and inbuilt features of VS code.

  • @GarrettH1
    @GarrettH1 Před 3 lety

    code languaged not supported or defined? anyone

  • @yusuframadhan6259
    @yusuframadhan6259 Před rokem

    my settings.json didn't appear

  • @mmuxa3955
    @mmuxa3955 Před 3 lety

    why is he naming folders as " v stool box"? I am confused

  • @wsfaso
    @wsfaso Před 3 lety

    great video, would like to see one use VS Enterprise to do the same thing,

  • @jrgomez
    @jrgomez Před 4 lety +1

    Great intro tutorial! Thanks!

  • @cloudbase7799
    @cloudbase7799 Před 2 lety

    How about wicked+cool or wicked%20cool?

  • @sergzach
    @sergzach Před 2 lety

    Can I debug several different Python programs in VSCode simultaneously?
    For example, interacting processes.

    • @Christobanistan
      @Christobanistan Před rokem

      You would use multiple instances of VS Code for that.

  • @sureshr2968
    @sureshr2968 Před 3 lety

    At 5.23, he had done something and vs code screen changed. What was that? I don't know what to do.

  • @user-or7ji5hv8y
    @user-or7ji5hv8y Před 4 lety +9

    I think a less complicated example than the flask example used would have been helpful, since the point is python and not about learning flask.

    • @rahimabaskiobya5048
      @rahimabaskiobya5048 Před 2 lety +1

      He confused me, the purpose was python on VSC, not Flask. He was required to explain extensions were needed to help python developers of different levels to understand. I quit on the way.

  • @max31505
    @max31505 Před 4 lety +1

    nice introduction+++

  • @slimygoopy4987
    @slimygoopy4987 Před 2 lety

    I still don’t fully understand venv. If Anyone would like to explain, it will be much appreciated

  • @akshaychaudhary8355
    @akshaychaudhary8355 Před 4 lety

    Great video plz make video on version controller

  • @TwstedTV
    @TwstedTV Před 4 lety +1

    Can you guys do a large series for C++ in Visual Studio 2019 (community edition) ??
    I also really wish you guys took over C++ extension for 'both' visual studio 2019 and code, like microsoft did for python extension.
    currently its a huge pain in the ass to get going with C++ extension in visual studio code, it would be nice if microsoft took over that extension and made it a lot easier on people
    to install and get going on both IDE's of visual studio 2019 and Code. Having to read huge text document and going through so many configurations and installations,
    just to be able to use C++ extension is a bit much and extremely exhausting. Having to spend several hours trying to get the extension to work properly without errors or mishaps,
    it would just be really nice if microsoft took it over and fixed all these problems that we should not be going through in the end of 2019 going on 2020.
    It shouldn't be this hard or this much of a pain just to use a C++ extension to learn C++ and enjoy learning to code.

  • @juanbatista6075
    @juanbatista6075 Před 2 lety

    Great job

  • @Hatemaill
    @Hatemaill Před 4 lety

    I don't have the play button

  • @summorandogamor6826
    @summorandogamor6826 Před 4 lety +5

    This video was amazing. :)

  • @DEV-pm7bw
    @DEV-pm7bw Před 4 lety +5

    can i use visual studio 2019 instead of vs code

    • @Kdog140
      @Kdog140 Před 4 lety

      'vs code' is shot for visual studio code so yes.

  • @josi749j
    @josi749j Před 3 lety +1

    Any body notice there last names end with green and white

  • @isaiahsgametube2321
    @isaiahsgametube2321 Před rokem

    good tut thanks

  • @nikolaristoski1489
    @nikolaristoski1489 Před 3 lety +2

    Ctrl + Shift + backtick (`) does open a new cmd but without the new virtual environment already activated 15:10

  • @abiabi6733
    @abiabi6733 Před 2 lety

    i know naming is really hard but why he is naming virtual environtment with "pictures"

  • @amitj8010
    @amitj8010 Před 4 lety +6

    Nice to see python in VSCode. Which sentiment library you are using ?

  • @younesthabet
    @younesthabet Před 4 lety +1

    I got a pylint problem that persists! I tryed everything on the internet to fix it without luck...

  • @HakimZainalAbidin
    @HakimZainalAbidin Před 3 lety +1

    I think video should be call Introduction of Visual Studio Code for Python. It an ice breaker to understand VS code platform capability with Python. For beginner, I think most probably get lost in the early part of the video.

  • @sergeos5
    @sergeos5 Před 4 lety

    why in vsc and not in vs2019?

  • @kevinh21labs
    @kevinh21labs Před 3 lety

    Yep, had to put on my big boy pants and google/Git the file. Took an hour to figure out how to get the file. Now to figure out how to get my environment to look like yours. I'm not a programmer. But I'm trying to learn. This kind of problem, as small as it is, can really derail someone's desire to learn to program. Does it have to be this hard? Maybe / probably just me.....

    • @EUU100
      @EUU100 Před 3 lety

      don't get demotivated just look for a youtuber that makes tutorials that you understand, there are so many to choose from. i have not even watched this video but already know it will not be useful for someone just getting started. I started my journey in January and haven't looked back since. Focus on sticking with what works for you and if it doesn't, don't hesitate to search for something that does. Good luck

  • @user-or7ji5hv8y
    @user-or7ji5hv8y Před 4 lety +13

    also, a more structured concise video is far more useful than something that is half extemporaneous, if I can give some feedback.

    • @Christobanistan
      @Christobanistan Před rokem

      Exactly, he was all over the place and the explanations were not clear. Overall it was hard to follow, needed more structure.

  • @samkim1410
    @samkim1410 Před 3 lety +1

    whoa.. i really got to like vscode after this video

  • @Chongweisingapore
    @Chongweisingapore Před 11 měsíci

    it is alittle easier for me to learn vba first then come to this visual studio and understand some features similiar here thanks. basically use cmp to lauch vs code + add python extension to use python

  • @kirkshibley946
    @kirkshibley946 Před 2 lety

    wickedcool!!!

  • @J235304204
    @J235304204 Před 4 lety

    How popular is this, the UI seems to be very complex and confusing.

  • @slimygoopy4987
    @slimygoopy4987 Před 2 lety

    Theres a problem with activating the venv for me. It’s something to do with the execution policy.

    • @Christobanistan
      @Christobanistan Před rokem

      Open an elevated powershell window. Type: Set-ExecutionPolicy RemoteSigned
      Should do this on every new device you wanna use ps commands on.

  • @Panchtantra2
    @Panchtantra2 Před 3 lety

    very cool

  • @sanuk9650
    @sanuk9650 Před 3 lety +1

    Visual Studio Code is great code-editor...but don't ignore Visual Studio IDE which is also a great ide for Python but unfortunately the latest version of Python is not supported in that IDE...😒😒 I use Visual Studio for C/C++ & Python

  • @Nickdude6
    @Nickdude6 Před 4 lety

    What is happening at 6:36-7:30?

    • @raj-zo4ev
      @raj-zo4ev Před 4 lety

      he created a new folder "vstoolbox" and opened that folder in vs code using command line.

    • @camron1103
      @camron1103 Před 3 lety

      he is just creating a folder using the command prompt and using the command prompt to get to the folder he just made (using the command prompt)

  • @thuglife896
    @thuglife896 Před 3 lety

    👍

  • @justjoejoe_0
    @justjoejoe_0 Před 4 lety +1

    Not going to lie, I almost fell asleep 3 times

    • @4guns
      @4guns Před 4 lety

      That is funny stuff right there.

  • @garyrowe58
    @garyrowe58 Před 2 lety

    That 'virtual' environment doesn't actually look very 'virtual' ;) If it has its own folders and copies of everything, it seems like its an 'actual' environment!

  • @raysah
    @raysah Před 4 lety

    How do you remove the file path and version that appears each run you run the script on the terminal, i only want to see the output of my script and nothing else
    For example,
    Instead of seeing this output each time
    PS C:\Users\username\xxxxxx\xxxxxxxxxxxxxxxx> & C:/Users/username/AppData/Local/Programs/Python/Python38-32/python.exe "c:/Users/username/test.py"
    I only want to see the output of the actual script
    "Hello World"

  • @timostimostimostimos
    @timostimostimostimos Před 2 lety

    Dustin Hoffman is a coder now?

  • @Skulltroxx
    @Skulltroxx Před 2 lety

    why are they using Purple for VS Code, when the colour is the first thing that helps us distinguish between VS n VS Code. Bruh

  • @bhuvaneshs.k638
    @bhuvaneshs.k638 Před 4 lety +2

    Add Visual Studio to Linux distros....

  • @MetaJamm
    @MetaJamm Před 2 lety

    Click download here, okay cool, and click new file here, okay cool, and now draw that source controlled virtually enveronmented frickin owl, my command line lover cumrade! :D

  • @vibdib
    @vibdib Před 4 lety +1

    Are you saying vs code is more popular than anaconda

  • @twliii1003
    @twliii1003 Před 4 lety

    If anyone sees this: can a virtual machine have programs downloaded that aren't on the users machine so others can play around with your app? Witty comments welcome, but just wanting to learn and see how genuine a community can be. Hope you're staying happy and healthy, reader!

  • @bls512
    @bls512 Před 3 lety

    Tyreke should be the solo host of this show

  • @dadwal2
    @dadwal2 Před 3 lety

    not clear at all , to me

  • @refactorear
    @refactorear Před 4 lety +6

    20:30 millennials 😄

  • @dhaisa
    @dhaisa Před 4 lety

    Ffs do one for c/c++ too plz!!....

  • @malcolmxparis7158
    @malcolmxparis7158 Před 3 lety +2

    This was a terrible "Getting Started" video for someone new to Python. He went from "Hello World" to an fairly complex/advanced code "example".
    Also too many "Uh's". If Constructive Criticism is allowed.

    • @resurgammedia1511
      @resurgammedia1511 Před 3 lety

      Totally agree, this is not getting started, this is a learn visual studio if you already a programmer....

  • @samkim1410
    @samkim1410 Před 3 lety +1

    I don't know if it's just a standard in Korea.. but don't you guys "rehearse" before shooting for such publicity? and some editing would've been nice.

  • @kimdoratisdale6757
    @kimdoratisdale6757 Před rokem

    Delt the parent control off tablet

  • @talkingweevil3172
    @talkingweevil3172 Před 3 lety

    I already know how to do 99% of this stuff...

  • @almuhimen8023
    @almuhimen8023 Před 4 lety

    VS Code is good, but I think I will stick to pycharm.

    • @Christobanistan
      @Christobanistan Před rokem

      Advantage of VS Code IMO are: A) Better key bindings; B) can use it for many langs; and C) all features in free version since there's no paid version.
      Also, VS Code is open source and there's positives for having such a big user base, including many extensions, community support, and employers prefer it. Those are some major intangibles!

  • @petrosstyle2981
    @petrosstyle2981 Před 2 lety

    Don't use VSC for python project, it is not designed for python, there are plenty of other editors that make python developing much easier.. VSC is very good for web development and C++ coding but NOT for python.