All Questions
Tagged with visual-studio-code python
8,558 questions
0
votes
0
answers
58
views
How do I turn the Run button into Run and Debug in VSC?
On my newest project in VSC, I have a Run button:
(with a play symbol),
but on my previous project, I had a Run and Debug button:
(with a bug symbol over the play symbol).
How do I get the Run ...
0
votes
1
answer
61
views
How to use debugger in Colab?
when we use vscode we can debug inside function from where we call function. How to do like that in google colab cloud server? Please help me.
def decorator(func):
def wrapper():
print(&...
Advice
1
vote
4
replies
155
views
Best resources to learn Data Structures, Algorithms, and Big-O from scratch (for Python)
I want to learn Data Structures, Algorithms, and Big-O notation from scratch, but there are too many resources online and it’s difficult to determine which ones are trustworthy or widely used by ...
0
votes
0
answers
48
views
Using jupterlab-sidecar (or similar) within VSCode notebook
So VSCode (Cursor) allows one to use notebooks within it. A very nice widget for JupyterLab is this jupyterlab-sidecar, which allows one to split the screen and do things like visualize a map and ...
0
votes
1
answer
91
views
Can we edit .py files in VSCode and use Google Colab extension to run them on Google servers like Jupyter Notebooks?
I have just get my hands dirty with VSCode's extension Google Colab (by Google).
While I can connect to google servers for running Jupyter Notebooks (.ipynb files), Is there a way to use VSCode ...
2
votes
2
answers
73
views
VSCode/Pylance highlights "Import could not be resolved" after moving files from a subfolder to the root
I’m working on a Python project on Windows 11 using VSCode.
I recently reorganized my project by moving all files from a subfolder to the root folder so that the code can be executed directly from the ...
0
votes
2
answers
96
views
python: vscode doesnt highlight direct import from module
When I attempt to import a module from a local package (from core import config), VSCode's syntax highlighting isn't working. When hovering over config, it shows "config: Any" (the editor ...
0
votes
0
answers
73
views
How to run VS Code Python tests inside an external app’s embedded interpreter?
I'm working on Python code that must be executed inside an external application which embeds its own Python interpreter (not the system Python, nor a virtual environment).
Because of this, I can't ...
0
votes
1
answer
74
views
Tkinter not display window; declared as part of class
Running VSCode with MS Python extension and my window will not display
here's my code
import tkinter as tk
class FormMain:
def __init_(self):
self.build_controls()
def build_controls(...
0
votes
0
answers
66
views
Rendering matplotlib figure in VSCode (Jupyter) like fig.savefig
Problem
When saving a matplotlib figure using fig.savefig(), the figure looks different from when the figure is rendered in a Jupyter Notebook.
Question
How can I render a static (non-interactive) ...
0
votes
2
answers
84
views
VS Code does not recognize any Python interpreter
I installed pyenv-win in Windows 10 and followed the instructions to set all system variables and it works fine in the cmd.
> python --version
Python 3.10.2
When I try to use VS Code it doesn't ...
2
votes
1
answer
109
views
Launching a python script in vscode with arguments I get FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\USERNAME\\FolderName'
I am trying to debug python code in vscode using a launch config that asks for command line arguments.
My script is located here:
C:\Users\USERNAME\FolderName - With Spaces\_MyHome\Documents\Dev\...
1
vote
0
answers
58
views
VSCode debugpy launcher command not executing automatically in terminal after shell initialization commands
Problem
When launching a Python debug session in VSCode using debugpy, I see three commands spawned in the integrated terminal:
devbox shell - executes automatically ✓
source /path/to/project/.venv/...
1
vote
0
answers
327
views
Switching over from Spyder to VSCode
I am a long time user of Spyder to do data science with Python. At work I am trying to switch over to VSCode so that I can benefit from AI tools such as Amazon Q. So far I can not put together a set ...
0
votes
1
answer
87
views
Python in vscode does not autocomplete or suggest built in class method
I am using vscode for Python dev. I have the Microsoft Extensions (Pylance, Python, Python Debugger, PythonEnviroments) installed and working.
The issue is when I try to make a metaclass in vscode ...