HomeОбразованиеRelated VideosMore From: ProgrammingKnowledge

How to Set Up Python in Visual Studio Code on Windows 10

1394 ratings | 159832 views
in this video I am going to show How to Set Up Python Development environment in Visual Studio Code in windows 10. I am also going to show ow to debug your python code using vs code. This process will also cover How to Install Python and Visual Studio Code for Windows 10. -------------------Online Courses to learn---------------------------- Blockchain Course - http://bit.ly/2Mmzcv0 Big Data Hadoop Course - http://bit.ly/2MV97PL Java - https://bit.ly/2H6wqXk C++ - https://bit.ly/2q8VWl1 AngularJS - https://bit.ly/2qebsLu Python - https://bit.ly/2Eq0VSt C- https://bit.ly/2HfZ6L8 Android - https://bit.ly/2qaRSAS Linux - https://bit.ly/2IwOuqz AWS Certified Solutions Architect - https://bit.ly/2JrGoAF Modern React with Redux - https://bit.ly/2H6wDtA MySQL - https://bit.ly/2qcF63Z ----------------------Follow--------------------------------------------- My Website - http://www.codebind.com My Blog - https://goo.gl/Nd2pFn My Facebook Page - https://goo.gl/eLp2cQ Google+ - https://goo.gl/lvC5FX Twitter - https://twitter.com/ProgrammingKnow Pinterest - https://goo.gl/kCInUp Text Case Converter - https://goo.gl/pVpcwL -------------------------Stuff I use to make videos ------------------- Stuff I use to make videos Windows notebook – http://amzn.to/2zcXPyF Apple MacBook Pro – http://amzn.to/2BTJBZ7 Ubuntu notebook - https://amzn.to/2GE4giY Desktop - http://amzn.to/2zct252 Microphone – http://amzn.to/2zcYbW1 notebook mouse – http://amzn.to/2BVs4Q3 ------------------Facebook Links ---------------------------------------- http://fb.me/ProgrammingKnowledgeLearning/ http://fb.me/AndroidTutorialsForBeginners http://fb.me/Programmingknowledge http://fb.me/CppProgrammingLanguage http://fb.me/JavaTutorialsAndCode http://fb.me/SQLiteTutorial http://fb.me/UbuntuLinuxTutorials http://fb.me/EasyOnlineConverter

Html code for embedding videos on your blog
Text Comments (128)
ProgrammingKnowledge (2 months ago)
Python Tutorial Course for Beginners - Please Chick to View https://www.youtube.com/playlist?list=PLS1QulWo1RIYt4e0WnBp-ZjCNq8X0FX0J
Musharaf ullah (2 days ago)
hello sir i need your help when i click on preferences inside file in my vs code not show these setting like your where i paste git bash link?????? please #reply
ABRAHAM LINKON (4 days ago)
thank you so much
jobs Aon (7 days ago)
yay i can do on VS instead on some shit eciples
Kakarotto (7 days ago)
So I could just download it from visual studio code instead of doing that complicated shit
Vithu Uthaya (8 days ago)
If launch,json is missing go to debuggng.. select 'Python' for configration , it will auto generate launch.json
H- Nice (9 days ago)
I am hoping you can help me. I just updated my VSC and I sides to be able to debug then a little toolbar would pop up and I could run my python program. Now I am getting a message that I have to select a Python Interpreter before I can debug. Python 37-32 is on the status bar and I choose it but I still get the message. Now it seems that the program will produce output in terminal. Is this just the new way VSC runs python programs?
Pedro Afonso (9 days ago)
Thanks so much, you helped me a lot !
Liang Jiang (14 days ago)
why not just use another IDE? VS code has very poor support for python.
Andrej Passco (22 days ago)
Why it is working completely different for me? Every dumb program from Microsoft is headache which working like our government
herve bilomba (26 days ago)
Nazeerah Armanza (26 days ago)
do you already make videos how to instal pipenv and django for windows10? I really need that
中西晴奈 (1 month ago)
Omg thank you so much for this! I had been having trouble doing this. This helped me a lot
LangeL (1 month ago)
im just gonna use sublime ...
Rakshith Kumar r (1 month ago)
what i have to do..if i not get the path
GalaxyDJx (1 month ago)
Got it to finally work gg
Marco Ulmanella (1 month ago)
Kim Fuck U (1 month ago)
Nice, this helped me to take my first baby steps! I also installed pylint and hit one of the typical issues! I had an old version of pip (used to install python modules) due to Visual Studio being on my machine. So I had to upgrade pip but forgot to run the CMD in Admin mode first. Further down the line pylint couldn't be installed without admin privileges either, so I ran VS Code as administrator too. Didn't had to fiddle around with the configuration JSON though!
Budoor AlOshi (1 month ago)
Thanks so much :)
Cory Irwin (1 month ago)
pythonPath isn't showing on my launch.json
Jack Manhardt (1 month ago)
The easy way that worked for me is to click the "select python environment" in the bottom left. As long as you added python to the PATH correctly it should give you the option to click on your python.exe location at the top. Then you should be all done :)
Marek Olejnik (1 month ago)
The same here
askforkris games (1 month ago)
my launch jason doesn't tell me the path like yours. and when i pressed debug the launch JSON option didn't come up
AYUSHI SHARMA (1 month ago)
"The TARGETDIR variable must be provided when invoking this installer" I am getting this popout notification when i am installing the python..Plzzz help me in resolving this issue
Rahul Singh (2 months ago)
sir my code is not run in vscode editor and please help me
Lu Xiao (2 months ago)
The configuring process really extinguishes a beginner's interest and ambition.
Lu Xiao (2 months ago)
Yes, you're right. I failed many times in configuring python. At last, I gave up and switched to pycharm. But your video let me run my first python program successfully in vscode, thanks anyway.
Pix Plays (2 months ago)
also filters out the weak early. Programming is half looking up solutions and guides for your problems especially early on, so you need to be willing to do this.
Jayesh Parab (2 months ago)
i am getting the following error: The term 'C:\Users\jayes\AppData\Local\Programs\Python\Python37-32\python.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:261 + ... l\ptvsd'; & 'C:\Users\jayes\AppData\Local\Programs\Python\Python37-32 ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (C:\Users\jayes\...7-32\python.exe:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException Please help
Dror Reuven (2 months ago)
I need help from someone here when I install visual studio code the file launch.json was not there somebody can help me with that??
Aastha Rai (2 months ago)
thank you so much
Jignesh Patel (2 months ago)
It was really very helpful and perfectly explained....Thank you
Dankmon (2 months ago)
for yall beginners, you should start with java script, it is much easier
Ben D (2 months ago)
Trying to edit PATH doesn't give me a list of options like it gave you, it doesn't let me add new paths. Im not prepared to edit the current system path and screw up my computer.
Ben D (2 months ago)
I believe that menu is a windows 10 thing. You can do it on windows 8 you just have to add ;C:\Python27 OR ;C:\Python33 onto the end of whats already in the path variable depending on what version you got installed.
William Peacock (2 months ago)
it says i dont have a json file
Mefref Giweuhef (1 month ago)
Shivansh Aggarwal (2 months ago)
What is this git ? Do i need to install it ?
TheMisterDOGG (2 months ago)
какого хуя не на русском товарищ разговаривает?
Umar Raza (2 months ago)
thanks bro .......love you
abhinav jha (2 months ago)
thnks bro..u saved my day
abhinav jha (2 months ago)
not needed for python development
Shivansh Aggarwal (2 months ago)
What is this git ? Do i need to install it ?
Smit Nirdosh (3 months ago)
everything works fine but the terminal doesn't show any output...
Pain_Is_Good (3 months ago)
I want to empty that desktop trashcan.
Thơ Trịnh (3 months ago)
Vidushi Mahalwar (3 months ago)
Thanks a lot!! Very helpful video.
T3hMillion (3 months ago)
Ok so everyone that is having trouble with debugging not stopping on break points or stopOnEntry is not working. install python 2.7. I installed the latest version of python and it just doesnt work with VS code. Installed python 2.7 and added the paths to my Python27 folder and debugger started working right away! also i couldnt get wxPython to work with python 3 so i think python 2.7 is better anyways!
Clarence Washington (3 months ago)
My computer is different, launch.js didn't show up at all. Something is up with my setup.
Shaq Solomona (3 months ago)
Thank You!!!
D. Diamond (3 months ago)
good stuff bro! helped a lot, works just fine
sci story (4 months ago)
thanks bro your video helped me a lottttttttt.very very thanks
Phantomx79 (4 months ago)
When I go in to system environment variables , path and edit I don't get where I can create a "new". It just has a window with Edit system variable, Variable name: Path and Variable value: etc.
Ben D (2 months ago)
Same problem
Mindsetxstyle (4 months ago)
does this need to be applied for the other plugins in vs code to work?
Paco McTaco (4 months ago)
Thank you for posting this, it's exactly the information I needed.
Liliacfury Tail (4 months ago)
When I click the debugging option when its set to no configurations, the fire wall doesn't pop up, just this list thing asking me to 'Select Environment'. 11:40
Sherry Chen (4 months ago)
Excuse me.DO you know why i don't have the red dot when i point the second line.Thanks~~
Perishings (4 months ago)
im having problems with the debuging part where fire wall opens it does not happen for me
Jake Senkewicz (4 months ago)
Try clicking on the drop down menu next to the green debugging arrow and selecting "Add configuration" then "Python"
Liliacfury Tail (4 months ago)
Firecat 4K (5 months ago)
When I start to debug the terminal opens, is there a way to make it so the debug console opens instead?
yeah I'm trying to find the setting to launch the Debug Console instead of the Terminal - no luck
Praveen Kulkarni (5 months ago)
hi please show how to install django using vs code
Michael Scofield (5 months ago)
Thanks a lot!
Petrockspiracy (5 months ago)
Doesn't work
Joseph Saber (5 months ago)
very good video but how can I run python code in external win32 native console application
Ngọc Lâm Nguyên (5 months ago)
Many thanks bro
ShogunBlackShark (5 months ago)
Thank you for this great tutorial for the setup of python in VS Code.
AHMED BAAHMED (6 months ago)
it dosen't work for me! i am using python 3.7 and VS Code 1.23.1, windows 8.1 32 bits. please i need your help. i look forward to hearing from you. Thank you
Mohammad S. Islam (6 months ago)
I couldn't find launch.json file. Pls help.
Aladeen (3 months ago)
ask your fake prophet
MrSantoshkumarp (6 months ago)
Appreciate the "ProgrammingKnowledge" Team for keeping very helpful knowledgebase videos on the web for the world of programmers. Thanks a lot
avinash reddy (6 months ago)
Hi, thanks for making this video, very helpful. However, when I install Visual Studio code and go to launch.json, the code I see in my system is different what is shown in the video. 'pythonpath" is not at the beginning but its at the end of the code and though i change the path in user settings I still get some error which states that path which i have given is not recognized. Plz help
Haydhn (6 months ago)
My launch.json file doesn't have the same settings as yours. I don't have a stopOnEntry setting. Is there a way I can add this? I tried just typing it in like it is in your file but it doesn't work.
Vithu Uthaya (8 days ago)
Try this, { "name": "Python: Current File", "type": "python", "request": "launch", "program": "${file}", "console": "integratedTerminal", "stopOnEntry":true },
Jeryl Estopace (5 months ago)
check this out https://code.visualstudio.com/docs/python/python-tutorial
Jeryl Estopace (5 months ago)
you'll have to add "stopOnEntry" on the json file. You may edit the json file similar to his.
McStar (6 months ago)
Haydhn mine is v3.5
Haydhn (6 months ago)
I didn't. I ended up uninstalling VS and just grew accustom to using the Python IDLE. If you're a beginner like me I recommend using the Python IDLE, it's simple and doesn't have any bells and whistles but if you're just learning Python it's adequate. Also, what version of Python do you have installed? I'm using 2.7 and I suspect that's why my .json file settings were different.
Stefan Ciobotaru (6 months ago)
It worked for me. Many Thanks!!!
Gerson Santos (6 months ago)
Thanks brother. Sucess
Milan Gerloff (6 months ago)
EJK Developer (7 months ago)
I had to add the config manually to get debug to work properly... I just copied what is in your 'Python' option under configs to use.. Saved it, the launch.json file, then debug worked fine. "name": "Python", "type": "python", "request": "launch", "stopOnEntry": true, "pythonPath": "${config:python.pythonPath}", "program": "${file}", "cwd":"${workspaceFolder}", "env": {}, "envFile": "${workspaceFolder}/.env", "debugOptions": [ "RedirectOutput" ]
Gamers Doom (7 months ago)
please can you attach the vscode/launch.json because i have a different code for that
Ryu Akamatsu (7 months ago)
I accidentally deleted my .vscode what should I do?
Smit Nirdosh (7 months ago)
Why am I getting this message in the output terminal : R:\python>cd r:\python && cmd /C "set "PYTHONIOENCODING=UTF-8" && set "PYTHONUNBUFFERED=1" && "C:/Program Files (x86)/Python36-32/python.exe" C:\Users\stark\.vscode\extensions\ms-python.python-2018.3.1\pythonFiles\PythonTools\visualstudio_py_launcher.py r:\python 49291 34806ad9-833a-4524-8cd6-18ca4aa74f14 RedirectOutput,RedirectOutput r:\python\new.py " please help
Clifford Mathew (7 months ago)
Thank you
squirekev (7 months ago)
Helpful installation and up to date with 2018 so thanks! VSC must be getting very popular with Python users as the Extension Python MS install is up to 9,319,715 user by now since your Jan 2018 tut upload. It feels like a good IDE for familiarizing oneself with for the future for further explorations into C#, C++ , etc.
M Bunting (7 months ago)
Very helpful! Microsoft should reference this video for setting up VScode!!!
Michael poon (7 months ago)
Thanks for making this video
Hercules (7 months ago)
Awesome...very helpful. Thank you very much.
jonathan simon (7 months ago)
Great thanks to you for this video bro!
Nas Rol (7 months ago)
Thanks so much
박원정 (7 months ago)
Thank you So much!! I've been struggling so hard to figure out the setting PATH on Python and Visual Studio Code. I followed every step of your instruction and it's working fine now. Thank you again!
Matthew Heckman (7 months ago)
Same here! I had to re install everything because I got the path wrong.
Branden Schwartz (7 months ago)
Video helped out a lot, thank you very much!
Md Oion Mahmud (8 months ago)
All is ok but number dont add but why pls help me..?
4D4M _edits (8 months ago)
this isn't working for me I have been trying for three hours I'm getting so pissed off someone help please
Aaron Herman (8 months ago)
Super helpful! Thanks!
cyber punk (8 months ago)
why cant i just run python by just one click ?
Qingyu Wang (1 month ago)
Use IDLE or Pycharm, which are IDEs made just for python.
Good Boye (3 months ago)
bcuz it allows you to create a whole serie of code instead of executing a single line
Thomas (4 months ago)
Just hit F5
I am already started with VS at this point
張宇 (4 months ago)
the plugin coderunner can meet your needs
Rusli Tile (8 months ago)
very helpful
Matthew Perlee (8 months ago)
Very helpful, thanks!
YUHAO HE (8 months ago)
Sorry may I know what is the purpose of adding python to environment variables? thank you so much
Taneli Heikkilä (8 months ago)
Nearly lost my mind yesterday with this thing but now suddenly everything makes sense. Thank you!
GoodGameGod (8 months ago)
thank you
love song status (9 months ago)
Hello sir....... I want to make a android apps..... Can you make a.. apps for me. .... i want to making apps like as earning apps...... can you make..... . And how much money want..?
Michael Banerjee (7 months ago)
this is sad
Nigel Doyle (8 months ago)
I have no words....
Ali Baba (9 months ago)
F_X (9 months ago)
Great video my brother, very helpful!
Sumesh (9 months ago)
Sir please dual boot kese kre... Kali linux and window 10..safe method Please sir ... I request you
Annie (7 months ago)
Why don't you just install Virtual Box and put Kali on that as a virtual machine. I have a few Linux operating systems in Virtual Box. Much easier, I think. Also, if you have problems with your Kali you can just delete the whole OS and start fresh without damaging your windows at all.
Hamza Yousuf (9 months ago)
Love your video
Maahi Haseen (9 months ago)
How to install social engineer Toolkit

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.