Visual Studio Code (Mac) - Setting up a Python Development Environment and Complete Overview

Sdílet
Vložit
  • čas přidán 4. 07. 2024
  • In this Python Programming Tutorial, we will be learning how to set up a Python development environment in VSCode on MacOS. VSCode is a very nice free editor for writing Python applications and many developers are now switching over to this editor. In this video, we will learn how to install VSCode, get the Python extension installed, how to change Python interpreters, create virtual environments, format/lint our code, how to use Git within VSCode, how to debug our programs, how unit testing works, and more. We have a lot to cover, so let's go ahead and get started...
    VSCode on Windows - • Visual Studio Code (Wi...
    Timestamps for topics in this tutorial:
    Installation - 1:11
    Python Extension - 6:21
    Switching Interpreters - 10:16
    Changing Color Themes - 13:08
    VSCode Settings - 17:12
    Set Default Python - 22:24
    Using Virtual Environments - 25:52
    IntelliSense - 30:28
    Code Formatting - 33:08
    Code Linting - 38:01
    Code Runner Extension - 40:45
    Git Integration - 49:05
    Debugging - 58:15
    Unit Testing - 1:02:38
    Zen Mode - 1:10:42
    VSCode Site - code.visualstudio.com/
    Python Installation - • Python Tutorial for Be...
    Source Code Pro - github.com/adobe-fonts/source...
    VENV Tutorial - • Python Tutorial: VENV ...
    Git Tutorial - • Git Tutorial for Begin...
    Unit Testing Tutorial - • Python Tutorial: Unit ...
    My VSCode Settings - bit.ly/vscode-coreyms
    ✅ Support My Channel Through Patreon:
    / coreyms
    ✅ Become a Channel Member:
    / @coreyms
    ✅ One-Time Contribution Through PayPal:
    goo.gl/649HFY
    ✅ Cryptocurrency Donations:
    Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
    Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
    Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot
    ✅ Corey's Public Amazon Wishlist
    a.co/inIyro1
    ✅ Equipment I Use and Books I Recommend:
    www.amazon.com/shop/coreyschafer
    ▶️ You Can Find Me On:
    My Website - coreyms.com/
    My Second Channel - / coreymschafer
    Facebook - / coreymschafer
    Twitter - / coreymschafer
    Instagram - / coreymschafer
    #Python #VSCode

Komentáře • 262

  • @coreyms
    @coreyms  Před 5 lety +123

    Hey everybody. So this tutorial is a long one, but we cover just about anything you'd want to know about Python development within VSCode. Timestamps for topics in this tutorial:
    Installation - 1:11
    Python Extension - 6:21
    Switching Interpreters - 10:16
    Changing Color Themes - 13:08
    VSCode Settings - 17:12
    Set Default Python - 22:24
    Using Virtual Environments - 25:52
    IntelliSense - 30:28
    Code Formatting - 33:08
    Code Linting - 38:01
    Code Runner Extension - 40:45
    Git Integration - 49:05
    Debugging - 58:15
    Unit Testing - 1:02:38
    Zen Mode - 1:10:42
    If I missed anything then just let me know. Hope you're all having a great week!

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

      @SatansFlipFlop Linux is going to be very similar to the other videos apart from the installation, so I would recommend looking at their installation documentation for Linux:
      code.visualstudio.com/docs/setup/linux
      And once it's installed then you can follow along with the MacOS version and it will be almost exactly the same. The only difference is you will use Ctrl any time I use Cmd for a keyboard shortcut.

    • @Dubairealestatee
      @Dubairealestatee Před 5 lety

      please make a video to convert csv file to text in pycharm

    • @jbaqaeen
      @jbaqaeen Před 5 lety

      Well thought through video, thank you very much.

    • @bholaprasad26
      @bholaprasad26 Před 4 lety

      Hi, Corey, thanks for this amazing video. Finally, my setup was complete. It took me a whole day but I am totally happy with the results. I just have one question. Can you tell me how to use 'relative paths' in vscode? I have a folder opened in my workspace. Inside it, I have two folders - 1. Data, 2. Notebooks. I am trying to read a CSV file in a pandas dataframe where I used a relative path - pd.read_csv( '../Data/tweets.csv' ). It's working fine when I am running the jupyter notebook on my browser but it's not working when I am running it using vscode. Can you help me with this? Thanks for making our life easier. Love all of your videos.

    • @timmckeanmusic
      @timmckeanmusic Před 4 lety

      For a complete beginner user of VS Code and currently self-learning to program this was an incredibly useful and in depth set up of VS Code. Thank you so much!

  • @freecodecamp
    @freecodecamp Před 5 lety +129

    You are a great teacher!

    • @JustinMacri007
      @JustinMacri007 Před 3 lety

      Is this better then kite kite hit be so crazy editors plug ins are not installing on my Mac please help.

  • @ThePCTechDiva
    @ThePCTechDiva Před 5 lety +73

    I never comment on videos, but I just had to after working halfway through this video. This is the BEST tutorial on VS Code I've found. Corey, your commitment to high quality tutorial videos is amazing! Thank you for all you do!

  • @parallelworld.1
    @parallelworld.1 Před 4 lety +1

    The best tutorial you can find on CZcams for coding Python with VS Code. The introduction of code runner solves the annoying redundant output for me! Thanks a lot! Subscribed!

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

    I’ve been using vs code for about a year now and you have taught me a few thanks! Glad to see you swapping over.

  • @mochammadhusnirizal235
    @mochammadhusnirizal235 Před 5 lety +2

    Thank you very much for the comprehensive tutorial. I have been using VSCode for the past two months for Python-ing and fell in love with it!

  • @daniel280187
    @daniel280187 Před 4 lety +4

    Hi Corey, I've seen several of your videos already and I've got to say your teaching skills are second to none. I was moving from vim and Sublime to start using VSC and when I saw you had a video to setup VSC for Python I got excited.
    You are one of the best out there teaching people how to become proficient with Python. Keep up the good work!!
    Thanks for sharing the knowledge.

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

    2 years later and I am still using this video to set up my VSCode environment. Thanks Corey, now that I'm studying DJango in my spare time, the git repository should be very well tweaked. That's why I'm setting up my env again

  • @w1ze07513
    @w1ze07513 Před 2 lety

    First time I've gone through anything code related. Happy to have found this setup walkthrough. Amazing walkthrough. Much appreciated. Wish me luck y'all.

  • @fvgoya
    @fvgoya Před 5 lety +9

    On your survey, I vote for short videos. BUT, man, at the same time, no matter what the video's length you create. It is ALWAYS nice to watch. Thank you very much for share your knowledge with us and make our learning process easy.

    • @coreyms
      @coreyms  Před 5 lety +2

      Thanks. I actually created that poll because of this video. It came out longer than I planned, so I figured I’d check if people wanted long videos or short. After this I’ll definitely start creating more series whenever I can and it makes sense.

    • @fvgoya
      @fvgoya Před 5 lety

      @@coreyms thank you for all of your efforts Corey!!!

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

    Your videos are awesome man, Its incredible how much I learn with each one, wish you the best and keep it up!

  • @vacowboy75
    @vacowboy75 Před 3 lety

    Mr. Schafer: This is one of the most helpful and useful tutorial videos that I have come across in quite some time. I have booked marked it for future reference. Many thanks.

  • @thebuggser2752
    @thebuggser2752 Před 2 lety

    Another great video. Very thorough and very clear.
    It’s obvious that you put a lot of preparation into this and it’s very much appreciated.
    The video demonstrates that VSCode provides a feature rich development environment.
    Thanks!!

  • @Willguy24
    @Willguy24 Před rokem

    This is an extremely in depth tutorial, I have gotten what I need from it today but I have no doubt I will be back. Excellent work

  • @whattupdoe1
    @whattupdoe1 Před 2 lety

    previous pycharm user struggling with vscode. The first video to clearly explain this and get me going.

  • @realchrishawkes
    @realchrishawkes Před 5 lety +11

    Nice video! For the past 6 months I've been developing on a Mac (for my job at least).

    • @coreyms
      @coreyms  Před 5 lety +1

      Thanks! Is it the first time you've used a Mac for development? I've been using one for a few years now and really enjoy them. I love having access to Bash via the terminal, but judging from the video the Windows YT channel released a couple weeks ago, they're going to keep improving the Bash experience there as well:
      czcams.com/video/8gw0rXPMMPE/video.html

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

    Thank you for the video. I was having problems with coderunner extension and some settings on my VS Code, you are a God saver! Awesome video!

  • @mikeckennedy
    @mikeckennedy Před 5 lety +16

    Thanks for the shoutout Corey! (RE: Talk Python)

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

    Thank you for the great video. You are by far one of my favorite python teachers and I will be supporting you on Patreon or either a channel member.

    • @coreyms
      @coreyms  Před 5 lety

      Thanks!

    • @charlesbovalis6591
      @charlesbovalis6591 Před 5 lety +1

      Corey is by far the ABSOLUTE BEST INSTRUCTOR I have even come across online - Hands down !!!!

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

    Corey, once again. Many thanks for all of your videos. It has been very useful in my life. Thanks thanks, thanks!

  • @posoot
    @posoot Před 4 lety +4

    THE ULTIMATE PYTHON PROGRAMMING TEACHER!

  • @goodcompanycoffee
    @goodcompanycoffee Před 4 lety

    This is very thorough and clear. As always, thanks for taking us through step by step, and skipping things that might be trivial.
    I started with Atom as my text editor, because I loved the Hydrogen package for quick prototyping. But as I mature in my software development journey, and I require more debugging functionality and I run of my scripts from the terminal. VSCode enables me much more in this regard, without something that feels so heavy and onerous to learn. Moreover, VSCode makes switching my Python Interpreters much easier!

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

    yep, after a few hours of playing with vscode as a result of this video, I'm sold. Much better than sublimetext. No going back.

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

    Best tutorial video ever about VS code with Python !!

  • @fruitspunch
    @fruitspunch Před 3 lety

    Not gonna lie, this tutorial was superb. Concise and to the point. So much information of great value. I learned so much! Thank you very much, Sir!
    Now I just have to find a tut on "Java and VS Code" with similar quality and I'm all set :D

  • @djrongrey7826
    @djrongrey7826 Před 4 lety

    Great video, it explains in a fast matter clearly the intial setup of VS Code. I look forward to see more video, to get more experience on Python

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

    Thank you for such a comprehensive guide!

  • @speedlime1515
    @speedlime1515 Před 3 lety

    Thank you so much for this, has helped a lot setting up VSC and I am using it now as my main editor for Python. Keep up the good work I am now doing your Python video's.

  • @douglasaraujo9763
    @douglasaraujo9763 Před 3 lety

    Wow, amazing tutorial. I feel like I just came back from one very useful and interactive workshop!

  • @0568raju
    @0568raju Před 5 lety +1

    I started using vscode. Glad that your are here. Please make a tutorial on designing an app using flask or Django in vsvode

  • @naveenkrishnabhat
    @naveenkrishnabhat Před 3 lety

    I recently started learning Python. While searching for Python videos, came across your channel. @Corey Schafer: You are doing an unbelievable work to help others! Fluency of your presentation is the key I guess. I would not even comment on your depth of knowledge. Great skills. Thanks for all the help through your videos!

  • @janokruta6282
    @janokruta6282 Před 4 lety

    Great tutorial! Can't wait for the next video about VS Code

  • @resourciful
    @resourciful Před 5 lety +2

    This is exactly what I needed. THANK YOU.

  • @mohammedmoosasharieff1816

    Really long video... But worth it.
    Watched and Learnt. Thank you Corey.. 😄
    Finally, I can start coding on VS Code 😋

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

    Thanks for this! Great vid! It helped me set up VS code on my Mac and my Windows machine. Yes I watched both lol.

  • @amanmanojpreeti
    @amanmanojpreeti Před 3 lety

    The best tutorial for vscode with python development!

  • @samrousculp7432
    @samrousculp7432 Před 5 lety +1

    Lots of great tips. Thanks, Corey!

  • @gnuter3000
    @gnuter3000 Před 5 lety +2

    This was great and helpful as always! Bravo!!!!

  • @TheVitamineE
    @TheVitamineE Před 4 lety

    really nice general overview well explained. thank you so much for the effort and quality.

  • @MS-fu3zf
    @MS-fu3zf Před 5 lety +1

    That's exactly what I looked for. Thank you!

  • @destinyrodriguez2810
    @destinyrodriguez2810 Před 2 lety

    Thank you so much for making this video! I've been stuck and not knowing why it it my code wasn't showing in my terminal and you just showed me how.

  • @adanpalma4026
    @adanpalma4026 Před 3 lety

    thanks...your time and passion for teach us... I learned a lot. I am new using VSCode and your video helped me a lot

  • @mpbabu80
    @mpbabu80 Před 2 lety

    One of the best videos available for vs code

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

    Love your tutorials. Best informative videos ever. Thank you.

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

    You are doing such great job bro!!

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

    Wonderful tutorial, very informative, thanks a lot!

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

    Great video, you can open the json settings side by side by clicking the split editor on the top right, or shortcut in the ubuntu is (ctrl+\).

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

    You killed it, again!! Thank you!

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

    I watched this months ago. Amazing how much I missed/picked up this time around.

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

    This is such a great tutorial! Thank you!

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

    vscode seems pretty awesome. great video!

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

    Thanks a lot. Your explanation is just awesome!

  • @rehanali3113
    @rehanali3113 Před 4 lety

    Hi, First I'll like to give thumbs up for this video. It is very useful for beginners.
    I saw your video and notice 2 things that might you want to try.
    1. It is a little bit tedious to run code in the terminal with right-click again and again. So there is setting for code-runner that you can turn on always run file in terminal.
    2. For GIT management, try Git Lens as it gives you more control over git. I personally recommend it to everyone and once you tried, tell me how it feels.

  • @dweeder1453
    @dweeder1453 Před rokem

    Your videos are really good. Love all the details you add

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

    Unbelievably helpful guide this!

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

    VScode is the best. Especially for python and go. It has made coding so much faster for myself.

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

    This is very impressive teaching!

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

    Thanks for the clear explanation!

  • @mpbabu80
    @mpbabu80 Před 2 lety

    No other video even come close to this one thanks a ton to the author

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

    Thanks so much, my friend, great tutorial 😁

  • @ev3lynn141
    @ev3lynn141 Před 3 lety

    Great content! Thank you for helping us out :)

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

    This is really good, thank you for doing this

  • @lennyedwards62
    @lennyedwards62 Před 4 lety

    Fabulous video. Very much appreciated. Thank you

  • @miadabdi7785
    @miadabdi7785 Před 5 lety

    Spectacular!! this video solved lots of my problems. Thanks a lot. but if I were you, I would break down a long video into videos with specific subject (issue, topic) sorted in a playlist, then you could have higher view.

  • @chazyua
    @chazyua Před 5 lety +1

    You're the best, as always.

  • @abdullahiahmed6341
    @abdullahiahmed6341 Před 5 lety

    Hey corey, first thank you soo much for all your videos. They are the most informative well documented tutorials in CZcams. Is it possible if you do a django web application project for personal portfolio with blog section similar to the django project series you did before?

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

    Great tutorial! Thank you.

  • @blakehunsicker9458
    @blakehunsicker9458 Před 3 lety

    Thank you so much, this was incredibly helpful.

  • @lilprotakeit
    @lilprotakeit Před 5 lety

    Corey !! seems like you are born to make our life easier ... Again, please get inside the world of data analytics .. Python now a days also includes numpy, pandas, Matplot and seaborn .. it would be really nice to hear about these things from you

    • @coreyms
      @coreyms  Před 5 lety

      I'm working out the finishes on the last few Matplotlib videos now. Should be out in a week or two hopefully!

  • @buuqmarabo2778
    @buuqmarabo2778 Před 5 lety +1

    helpful as always, thanks!

  • @andriirubtsov5404
    @andriirubtsov5404 Před 3 lety

    Excellent tutorial!

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

    Very helpful!! thanks Corey

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

    Awesome video. Thank you!

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

    This video is amazing. Thank you so much

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

    Excellent content, Thanks!

  • @amortalbeing
    @amortalbeing Před 2 lety

    tip: make sure to install vscode-icons as well. it just makes the looks much much better!

  • @baharmand
    @baharmand Před rokem

    Very helpful, thank you.

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

    Thanks! I needed this! Couldn't figure out how to get python3 running as default.

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

    Great video. Thanks!

  • @Majagarbulinska
    @Majagarbulinska Před 3 lety

    Thank you sooo much! This saves me!

  • @InsightsofAJ
    @InsightsofAJ Před rokem

    Superb tutorial!

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

    I'd like to add to the virtual environment that you can have two different environments running at the same time in the terminal and at the bottom left. When you fire up the program, by default it will set the terminal to the environment you have selected in the corner. This option can be overridden. Also, make sure when installing the packages to check whether pip list isn't showing something fishy because there's a bug where it still thinks it's in another environment.

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

    You are really awesome. Thank you so much!

  • @juliocardenas4485
    @juliocardenas4485 Před 3 lety

    Excellent !!!

  • @oramata_team
    @oramata_team Před 4 lety

    I learnt a lot from you , Thank you

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

    thank you. I didn't know about code-runner and I was using Jupyter notebooks just to avoid seeing crazy terminal messages lol.

  • @cylonscion5470
    @cylonscion5470 Před 5 lety

    Thanks for this vid and this looks like a nice dev environment. I won't really switch to it though because of telemetry. There is also VSCodium which removes all Microsoft branding/telemetry before compiling but unfortunately it has no control over telemetry sent by individual extensions, including the python extension.

  • @neophyte88
    @neophyte88 Před 4 lety

    thank you !! this is really helpfull !!

  • @waex7089
    @waex7089 Před 5 lety +50

    Hey can you create a playlist about docker with python

  • @jairusan
    @jairusan Před 3 lety

    Thanks so much, Corey for the detailed video, I have one detail to point out and one question, I think that by the time I watched this video VScode already have done some changes/upgrades on their program, e.g. the button in the top that runs the code in the terminal is already there now without adding the CODE RUNNER extension, in that case, I still would like to make the change on the integrated terminal that shows in a cleaner way the output of the python code. If you are aware of this or have an update video about that I will really appreciate if you can point me to it, or if you know which setting should I look into in VScode will be really appreciated? Great stuff from you as always! and take care.

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

    Thanks a lot !

  • @user-bg2zt3sc3l
    @user-bg2zt3sc3l Před 10 měsíci

    great effort!

  • @ygcjayalal
    @ygcjayalal Před 3 lety

    Thank you so much your great effect

  • @enriko3694
    @enriko3694 Před 5 lety +1

    Hi Corey,
    Spyder has this really friendly color theme creater. I find that I really enjoyed one color scheme I made through Spyder and is one of the biggest reasons why I still use Spyder. Would you happen to be able to explain where I can create my own theme on VS if it is simple enough?

  • @HassanMohamed-oz8hx
    @HassanMohamed-oz8hx Před 4 lety

    Hi Corey, I would like to tell you thanks for sharing your knowledge with us and your clear style of teaching. I would like to ask you to tell us how to make a certain Python version is the default in mac rather in the version 2.7 which already because absolute. or how to uninstall the out dated version 2.7 and then install the current updated one. I tried in to search but not yet succeeded to find. Thank you

  • @NIHIT555
    @NIHIT555 Před 3 lety

    this is gold..

  • @nathantorento1042
    @nathantorento1042 Před 4 lety

    Thank you so much for this practical and insightful tutorial!
    Question: would you happen to know why I can't format the document at all? Nothing works. Latest version of VSCode. All combinations: outside of a virtual environment, within a virtual environment, right-clicking then pressing format document, typing the default format document shortcut, typing a customized format document shortcut, python.linting enabled and disabled - nothing works. This seems to have been a bug, but it was reportedly fixed... I have Code Runner installed.

  • @JustinInBlack
    @JustinInBlack Před 4 lety

    THANK YOU SO MUCH SIR!

  • @ekbergpeter6987
    @ekbergpeter6987 Před 4 lety

    Wow, can't really take in you did one for windows and one for mac. It is just too GREAT!! One question. I don't have Debug in my menu at the top. Is that an extension?

  • @cedric1063
    @cedric1063 Před 5 lety

    Thank you for all this information, that is great. One question, I'm facing an issue when I use PyQt5. Everything is working but all my Qt method I call are Highlight mentioning "Undefined variable", then when I right click on, I can update "Qtlinguist", Once I click on, VS tell me that "Python update not found" then I have to create a path in the sitting ("pylupdate"). I don't know which one I have to write... Any Idea ?