Setting Up VSCode For Python Programming
[ad_1]
In this video I will show you how to setup VSCode to write Python code with some helpful extensions that include features like managing environments, intellisense, snippets, debugging, testing, documentation, live output and more
Python Extension:
https://marketplace.visualstudio.com/items?itemName=ms-python.python
Download Kite:
https://kite.com/download/?utm_medium=referral&utm_source=youtube&utm_campaign=TechGuyWeb&utm_content=python_vscode
AREPL:
https://marketplace.visualstudio.com/items?itemName=almenon.arepl
AutoDocstring:
https://marketplace.visualstudio.com/items?itemName=njpwerner.autodocstring
Python Test Explorer:
https://marketplace.visualstudio.com/items?itemName=LittleFoxTeam.vscode-python-test-adapter
💖 Become a Patron: Show support & get perks!
http://www.patreon.com/traversymedia
Website & Udemy Course Links:
https://www.traversymedia.com
Follow Traversy Media:
https://www.twitter.com/traversymedia
https://www.instagram.com/traversymedia
https://www.facebook.com/traversymedia
Source
[ad_2]
Happy Friday everybody. I wanted to do something simple today and just show you my setup for vsc/python. This assumes you have Python already installed. Have a great weekend!
nothing works
This tutorial is definitely not for beginners to programming.
Too advanced.
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?
#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 "<stdin>", line 7
@logging
^
SyntaxError: invalid syntax
So when I try to run python3 –version, I get this error
$ python3 –version
bash: /c/Users/cyb3r/AppData/Local/Microsoft/WindowsApps/python3: Permission denied
Can anyone help me?
I'm on Windows 10, Python version 3.9.0, PATH is installed… I don't know what to do and can't find answers on SO either…
thank you so much
I am relatively new to Python and this information was really useful
Really useful information. Keep up the good work!!!
This is the first time I am learning Python and it is really helpful
Can you tell me the background theme that do you use ?
Thx dude!
Bruhhhh, AREPL is godsend
this is a great video!!
Python unit testing starts at 15:33
so python 3.9 is out but when i change my interpreter to it, it just throws a "modulenotfounderror" please help me!!!!
how do i get pip install to work?
Why do we use Visual Studio Code(which is a code editor) for Python, instead of Visual Studio IDE ?
Thank u very much!
Everyone is just explaining how to debug on one single file. No one has posted when there are multiple files or dependencies. Please upload one if you have that
Very well paced! Great job!
Very helpful. Thank you.
This was really great the extensions you recommended are really helpful suggestions. Thanks.
I'm using Windows… it was very hard to follow this video. I think explaining the difference between the OS you're using and what others may be using should be addressed.
For example.. I'm not getting any of those auto completes starting from import… Not sure why but I'm completely lost after that part of the video @3:50
So i need to do all this steps every time i want to create a project ? , It's really boring
Hi. Hope someone can help me. As of today I started encountering a bunch of what I'm guessing are formatting warning messages in my Python files. I don't know what changed or where. The only new thing (last thing) I did today in my VSC was import pygame for some game programming, and these formatting warning messages are now popping up everywhere on my other files. Warnings about proper casing (for variables mind you), spacing, etc. I'm clueless about the settings in VSC as since install I've never had to play with them while coding. Any help? Thank you! =).
sir can u please explain why created a virtual environment in the earlier part of the video?
Just curious why you set up a virtual environment? I've just been using python as-is and I'm curious what the difference is?
visual studio code all the way – i tried pycharm… talk about bloatware.
guys i dont get the setting the environment, can someone please explain what that means, and what is also a virtual environment, and why didnt he just use and select environment.
thanks btw
Setting the venv doesn't work for me in the terminal. I'm in windows btw
Why do we need to setup a virtual environment? Im new so I don't know really I haven't seen anyone doing that before
I typed python3 -m venv venv but nothing happened zzz It didn't create an environment, no popup or anything
FYI: Git bash for some reason throws "permission denied" to python3 commands, so you might wanna switch to regular windows cmd as a default terminal for your vscode.
Tremendously helpful–thank you for sharing your knowledge!
Thank you for the video. I can not get these terminal commands to work. Is this video focused on a Unix/Max computer for executing these terminal commands? Thank you.
why when i click install it stucks on installing?
At least on windows it's "source ./venv/scripts/activate"
Could you do a tutorial on Apache airflow?
I'm getting an error using Requests. I went back to make sure I was doing everything right, but I'm still getting the error: Python Requests – No connection adapters @9:33. StackOverflow says to make sure you have the 'https://' which I do. ———- Is there some setup process that needs to be done, some host or something?
On my vs code editor at the top the code option ain't showing how do I do it
hi super dumb noob question: I enabled the python 3.8.3 and I type in the terminal python3 –v like you did in the video, but it gives me an error message, how can i fix that?
not too bad. a bit fast, but helpful.