Тёмный

How to set up Python on Visual Studio Code 

Kenny Yip Coding
Подписаться 23 тыс.
Просмотров 698 тыс.
50% 1

How to setup Python on Visual Studio Code (vscode)
Install Python: www.python.org/
Install Visual Studio Code: code.visualstudio.com/
After installing python, open the command prompt/terminal, and type in python --version or py --version. If you have installed python successfully, you will see the version of python you have.
Open vscode, and create new file. Name it whatever you want, but be sure to include the .py extension.
On the left, click the extensions icon, and search for Python. Install the python extension by Microsoft. This will allow for Python support in vscode.
Then, search for code runner and install the extension. This will add a run button at the top right of your vscode. Clicking this button will run your python code.
To have code runner output to the terminal instead of the built-in output console, click the settings icon (gear icon) on the bottom left corner. Scroll down until you see Code Actions on Save. Click settings.json and the file will open.
Add this line inside the json file: "code-runner.runInTerminal": true,
After that, you are all set!
Website: www.kennyyipcoding.com/
Java Game Programming Projects Playlist:
• Java Game Programming ...
JavaScript Game Programming Projects Playlist:
• JavaScript Game Progra...
Subscribe for more coding tutorials 😄!

Опубликовано:

 

18 май 2021

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 307   
@KennyYipCoding
@KennyYipCoding 3 года назад
If you run python --version or run your python code in vscode and see this error message: Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut... Click the python installer again, and click modify, click next, and check "Add Python to Environment Variables", then click install. Restart your computer afterwards and it should work now.
@maamarm46
@maamarm46 2 года назад
what do you mean python installer
@KennyYipCoding
@KennyYipCoding 2 года назад
@@maamarm46 Hi, when you download python from the website, it downloads an installer. You double click it to actually install python. Should be in your downloads folder.
@hirakmondal6174
@hirakmondal6174 2 года назад
This is because u are storing the file in other directory apart from C. For that u need to set the path variable, which is not shown in this video. Search some videos on RU-vid on how to set path of python
@justKubus
@justKubus Год назад
why is this so difficult
@kimkarydas
@kimkarydas Год назад
Thank you Kenny, I had this issue when merging my VSCode, very helpful. Amazing Video.
@Nuram0
@Nuram0 Год назад
Hey man, former Software Engineering student, now working a few years in cyber security department: Absolute great video. Very nice audio quality. I want to highlight how important it is for beginners to explain every single step i.e. "for me it says windows, so i download the windows version", "Click control-s to save it" etc. People usually have so many different backgrounds and when it comes to a video that is trying to board people on some new stuff this is really important :)
@sandvichenjoyer9453
@sandvichenjoyer9453 6 дней назад
Hey I want to get into the same field what can I do to prepare? Before studying it
@Nuram0
@Nuram0 6 дней назад
@@sandvichenjoyer9453 are you talking about software engineer or cyber security? I don't think you need any preparation software engineering. All you need is self-management and structure. If you can plan your day/week in advance and stick to learning times you'll make it. Regarding cyber security, I always recommend starting with an audit position in a larger company or as a service provider auditing different clients. You get familiar with lots of regulatory stuff and a lot of opportunities to see different architectures, systems etc. Afterwards I would go and try out some pentesting (hackthebox; Kali Linux etc. Do it for at least a year. Thats a good basis I'd recommend for everybody out there.
@retrolu1
@retrolu1 2 года назад
Thank you for saying " its the blue one, not the purple one " that was really helpful
@barackdill3081
@barackdill3081 2 года назад
Me too
@sushileaderyt1957
@sushileaderyt1957 2 года назад
when you are colorblinded blue and purple :
@aleksjagger9770
@aleksjagger9770 2 года назад
Life saver, didn't know that the purple one is for freaking C++ lol
@srujanmpadmashali
@srujanmpadmashali 2 года назад
@@aleksjagger9770 no you get everything in purple but it takes lot of space and all feautures are not free so not recommended.
@coronaklledmebot4856
@coronaklledmebot4856 2 года назад
@@aleksjagger9770 vsc isn't ide. it's code editor. you can write code in any language here.
@daily_content19
@daily_content19 2 года назад
Bro love this video. No useless talking , clear representation and flawless speech .
@icydragon542
@icydragon542 7 месяцев назад
Still using this as a tutorial 2 years later. Thank you Kenny!
@s.m.a1304
@s.m.a1304 2 года назад
simple, informative, straight to the point nice job
@fuwymechtopia8982
@fuwymechtopia8982 Год назад
Holy crap Kenny, you got yourself a sub. Friend referred me to Harvard's CS50 online course which I've been trying to study and follow along, but I could not for the life of me, get VSC set up for Python. The terminal just wasn't working for me and your video fixed it in 6 minutes. Well done dude.
@losc4927
@losc4927 Год назад
I just started the class yesterday and was struggling with this as well lol
@merve4661
@merve4661 Год назад
@@losc4927 lol same I started yesterday and the setting up is harder than the program itself XD
@programmer9809
@programmer9809 2 года назад
yo most of the videos are like 20 mins long, you are the best for keeping it straight to the point and keeping it short
@KennyYipCoding
@KennyYipCoding 2 года назад
haha that's the goal! 😁
@hyakushiki23
@hyakushiki23 Год назад
OMG! Thank you so much dude. Super simple. Start to Finish. I grew up with Juypter and I have been struggling with VSC for months. Your video helped a ton
@R0k47
@R0k47 3 дня назад
Very useful. Even in 2024. Was having so many issues as a beginner running my code in VS code I nearly changed ide's lol. Thank you
@not_hanky_ou
@not_hanky_ou Год назад
Went into this video expecting having to configure stuff. But I just started up vscode, selected python as language, installed plugin and boom - it's working. Nice vid tho!
@cheezy123
@cheezy123 Год назад
Your a legend!!!! I was having issues with working python and you just solved all of them!! 👑
@Infiniteosky_
@Infiniteosky_ 22 дня назад
I could not believe my eyes when I finally found a video that ACTUALLY WORKS😅
@colin985
@colin985 2 года назад
thank you i was so confused on where to start at first helped me a lot
@amra.haleem5175
@amra.haleem5175 Год назад
Thank you. Nice demonstration without any distracting music. : )
@AstraGamesStudios
@AstraGamesStudios 2 года назад
thank you so much ! not a 30min video with useless talk! great job!
@michaelai8274
@michaelai8274 Год назад
Amazing, thank you for the tutorial. Just about what is needed and a little extra to make coding smoother for my beginner self.
@FABESTAH
@FABESTAH Год назад
This was very helpful for me as a beginner, thank you very much :) ❤
@yobaking
@yobaking 2 года назад
Comprehensive. Worth every single second!
@darkclonexd
@darkclonexd Год назад
Tysm kind sir! I was into coding and tryna know how python works. As a beginner this really helped me to begin some tests! tysm again!
@Gabriella-jf
@Gabriella-jf День назад
I was burning my brain with that py files. I just runned as it was and still worked.
@Sneha-gb7iq
@Sneha-gb7iq Год назад
This video is very helpful..I've been facing problem in giving input to console.. Finally prblm solved😄
@kamilsybilski2521
@kamilsybilski2521 2 года назад
Thank you very much. You did a great job and helped me.
@DebashisTalukdar
@DebashisTalukdar 9 месяцев назад
Thank you. Straightforward and easy to follow through.
@shontam
@shontam Год назад
Exactly what I was looking for. Thank you.
@krazythekat9390
@krazythekat9390 Год назад
thx man, u solved A LOT of problems I had!!!
@murtazotoshniyozov4688
@murtazotoshniyozov4688 2 года назад
Thank you man. That was amazingly helpful=)
@aarondeimund6898
@aarondeimund6898 3 месяца назад
Thanks for this! I could not figure out how to change the output!
@mytek998
@mytek998 Год назад
Very, very helpful. Thank you a lot!
@yourohan6021
@yourohan6021 2 года назад
Bro u r amazing!!!!!! :) keep uploading
@multitaskprueba1
@multitaskprueba1 2 года назад
You are a genius! Amazing video!
@Jay-pe4gx
@Jay-pe4gx 9 месяцев назад
Thank you! It is now working!
@cooperanderson6412
@cooperanderson6412 6 месяцев назад
Very helpful! Thank you so much!
@diamondforareasonn
@diamondforareasonn Год назад
Smart, subscribed 💯 thanks alot bud
@pseudo-black6343
@pseudo-black6343 2 года назад
It's working for me, thank you!
@Unknown-xf6he
@Unknown-xf6he Месяц назад
Thank you man i was tryin to figure out why it wouldnt let me type and was goin nuts on it 😂
@me_SumanRegmi
@me_SumanRegmi Год назад
Thanks a lot Man! You are amazing!
@ilcapitano316
@ilcapitano316 2 года назад
thanQ very helpful video Kenny
@MegaBalgeet
@MegaBalgeet Год назад
helped me so much! thanks man
@RealTimeTech222
@RealTimeTech222 Год назад
Thank you man! much love!
@PabloStarOk
@PabloStarOk 8 месяцев назад
Thanks, your video was helpful.
@mohammadmahfuzkhan5814
@mohammadmahfuzkhan5814 Год назад
It was helpful. Thanks a lot
@Storiesandlessons1
@Storiesandlessons1 Месяц назад
Your Video was helpful, thank you
@ye-xionlin6976
@ye-xionlin6976 11 месяцев назад
this is very helpful! thanks
@user-jt1zp8ii3t
@user-jt1zp8ii3t 4 месяца назад
Thank you. I understood this tutorial easily❤
@maryjs9138
@maryjs9138 Месяц назад
My settings,Jason doesn’t have all those codes so it’s not switching to the terminal it’s still running in OUTPUT
@woolfy02
@woolfy02 2 года назад
Easy enough to setup just frustrating to learn all these commands! It's overwhelming. You make it look so simple lol
@Master-bb3hj
@Master-bb3hj 2 года назад
2022 >>>>>>>>?????
@kingsleydjeagbo8795
@kingsleydjeagbo8795 2 месяца назад
Thank you! this video really help.
@purplemosasaurus5987
@purplemosasaurus5987 2 года назад
Thank you so much, this helped me a lot!
@lesrappelsprofitentauxcroy3023
@lesrappelsprofitentauxcroy3023 2 года назад
Nice video, it's only because of this video I subscribed to your channel .
@MRST4SIO
@MRST4SIO Год назад
Thank you. This is very helpful
@deedeec160
@deedeec160 11 месяцев назад
Does using "py" as a command not work in Python version 3.11?
@eNit0x
@eNit0x 2 года назад
Thank you very much sir !
@martinkaspar5095
@martinkaspar5095 Год назад
howdy - awesome - ilove it. BTW - do i need to take care of envs etc. etx.?
@Luggruff
@Luggruff 8 месяцев назад
Is there any way to clean up the terminal output not to write the location of the file twice? Have mine in nested folders and the output gets buried...
@zlobert9877
@zlobert9877 Год назад
Hey man is there any way we can remove our directory in the terminal? So we are left with only our terminal name(and also i see your name has a colour,mine is the same color as the text). Help with those two would be great
@ilyasrusdi6165
@ilyasrusdi6165 2 месяца назад
thank you so much its help me a lot
@humairaadiba478
@humairaadiba478 8 месяцев назад
Hi! I just want to know if there is any problem if I don't use 'python' and just use 'py' while coding?
@babookumarheerani50
@babookumarheerani50 2 года назад
this video helped me thankyou
@paulklimenko8419
@paulklimenko8419 Год назад
is there a keyboard shortcut for the Run button there??
@PTNLemay
@PTNLemay Год назад
Do I need to create an environment to run Python on a Windows machine? I got VS Code running but it keeps asking me to create an environment?
@RetroFukie
@RetroFukie Год назад
would this be useful in starting to learn python? i tried with command thingy on windows but its annoying
@jonathanmendez310
@jonathanmendez310 3 месяца назад
Thank you for this! I just got Vs code but said to install python when i had it already but you showing us the terminal part going up there it was hiden to me with the 3 dots. Pressed terminal did command prompt and there we go cx! Thank you!!!
@alayna6438
@alayna6438 5 месяцев назад
I am trying to use command prompt to pull up my file. I am not sure how to do it when the file is under one drive. Right now my file is saved under C:>Users>Home>OneDrive>Desktop in Visual Code. Is there a way to bypass OneDrive or a special way to pull it up in Command Prompt? Any help would be appreciated. Thanks!
@yaboywho6822
@yaboywho6822 Год назад
When i make a file. I don't get that little python icon at the top. I only get a file icon, but does that mean i have no python activated?
@ZetaCG
@ZetaCG 2 года назад
My json-file is incomplete and my settings.json-file ist empty by Default. So you know how im able to Change this? Even reinstalling Visual Code doesnt Help.
@gnome6354
@gnome6354 10 месяцев назад
this deserved a subscribe
@stephanieredfox8393
@stephanieredfox8393 2 года назад
The code runner code doesn’t work for me it still runs it through output unless I hit f5
@joncharles5817
@joncharles5817 Год назад
My windows10 powershell says no such file or directory why won't it show up like yours
@ing.jasmellreyna7398
@ing.jasmellreyna7398 Год назад
Hey man, thank u so much.
@sameh7357
@sameh7357 11 месяцев назад
now have a problem when i click on the run bottom it does not work it give me that python was not found but when i go to terminal then new terminal it works how can i fix the running bottom
@Phantastischphil
@Phantastischphil Год назад
interesting scenario to me. When I cheched for version using "Python --version" and "Py --version" I got two different versions?! Does anyone know why this is and does it need to be solved somehow?
@TheTopGun920
@TheTopGun920 Год назад
I dont think Code Runner is required anymore. My VSCode is stock and it ran the file in the terminal just like in your video.
@rafaelrocha5626
@rafaelrocha5626 Год назад
can i get vscode to autofill my code like pycharm does?
@yourohan6021
@yourohan6021 2 года назад
i want more tutorials of VS CODE. I hope u will upload. :)
@sudhansumtripathy
@sudhansumtripathy 2 года назад
hi , how to disable the unwanted text output in the vis terminal window
@walledsand
@walledsand 2 года назад
Do you have any recommendations on what to program to improve your programming abilities
@firstname8078
@firstname8078 2 года назад
It depends
@walledsand
@walledsand 2 года назад
@@firstname8078 like just generally like he stuff everyone should know
@KennyYipCoding
@KennyYipCoding 2 года назад
Check out my html/css/javascript game tutorials! how to code WORDLE: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ckjRsPaWHX8.html how to code SUDOKU: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-S4uRtTb8U-U.html how to code CONNECT 4: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4ARsthVnCTg.html Also if you have time, check out the Python to Ruby code translator demo that I made :) ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-DXiKAEBdDBg.html
@markiandelacruz6169
@markiandelacruz6169 Год назад
Mine works in windows terminal but it doesn't work on vsc terminal or output. How to fix this? Im a noob trying to learn
@sahad8771
@sahad8771 2 года назад
Hi, My code runs only when I click the second option on the triangle(run python file in terminal).when clicking run code it does not give output
@RayBlaxe
@RayBlaxe Год назад
me too can anyone help me ?
@RayBlaxe
@RayBlaxe Год назад
update: i just found the solution here is the answer from the owner of this channel: Hi! Try doing this: Click the python installer again, and click modify, click next, and check "Add Python to Environment Variables", then click install. Restart your computer afterwards and it should work now. This should let you do python test1.py to run the program. Make sure you don't have any older version of python. If you have python2 as well, then you need to specifically say python3 test1.py, hope this helps!
@mohamed-fv4ux
@mohamed-fv4ux Год назад
You are awesome man
@CrusaderGeneral
@CrusaderGeneral 3 месяца назад
you can save a few steps.. once you create the py file, just hit F5 and it will prompt you to install all the python modules
@PawanBaral-uv8kq
@PawanBaral-uv8kq 6 месяцев назад
thx soo muxh man..
@Oringinaldai
@Oringinaldai Год назад
Can you help me? Everytime I try to run a “print” code it says command not found
@justKubus
@justKubus Год назад
the code dash runner thing did not work please help it still runs to output
@lahiru-madushan
@lahiru-madushan Год назад
Thank you brother
@trsshoron9893
@trsshoron9893 2 года назад
Thanks man. 😊
@charlottefx7163
@charlottefx7163 2 года назад
Hi, I am facing an error with vs code. The python version is not showing up in the bottom left area. and also the kernel is not able to connect with python. Sometimes it also says that the python extension is not installed kindly install it. I already have python 3.8 but still, it shows this error. I also have given the path location correctly but still, these errors are coming please help me🙏🙏😭
@kofeast
@kofeast Год назад
Thanks man!
@THEITFACTORPODCAST
@THEITFACTORPODCAST Год назад
This was a great video
@hastalavista8625
@hastalavista8625 2 года назад
Excellent Mate
@minecraft_Humans_Robots
@minecraft_Humans_Robots 11 месяцев назад
thank you million times
@nope6886
@nope6886 2 года назад
is python 3.7 different than 3.10?
@Alex-si5te
@Alex-si5te Год назад
Thank you so much
@zeazzo2997
@zeazzo2997 Год назад
thank you so so so much
@andreadimauro2161
@andreadimauro2161 2 года назад
Hi! I just have a problem: editor.codeActionsOnSave does not appear under my settings.json... only the theme color setting! 😕
@steven-fs5vf
@steven-fs5vf 2 года назад
same its just the workbench color theme
@daviddy3794
@daviddy3794 2 года назад
bro! when I run code it only works with the world (not a number)
@apbg_oficial9615
@apbg_oficial9615 Год назад
For me it gives the error saying: "C:\Users\user\AppData\Local\Programs\Python\Python311-32\python.exe: can't open file 'C:\\Users\\user\\desktop\\python1.py': [Errno 2] No such file or directory"
@vardaanthakur5513
@vardaanthakur5513 8 месяцев назад
you were a big help thank you !!
@mostafaua7432
@mostafaua7432 Год назад
Thank you a lot