All Questions
Tagged with visual-studio-code python
8,524 questions
Advice
0
votes
7
replies
174
views
Regex Search & Replace over multiple lines in Visual Studio Code
I want to turn python code triple quote strings that can possibly span multiple lines into comments using Visual Code. For example, turn
'''line 1'''
to
#'''line 1'''
or
"""
line1
...
Tooling
0
votes
2
replies
72
views
How to have two panes side-by-side sharing same environment?
I work with VS Code. I have one .ipynb file - my main script - and I would like to have another pane with another .ipynb notebook by its side where I can do some add hoc stuff with variables generated ...
4
votes
1
answer
1k
views
Workaround for VS Code Flake8 linting failed with KeyError
I have been using the Flake8 VS Code extension for Python linting with no problems.
Recently, with VS Code version 1.118.1 and Flake8 version 2026.4.0, I get the following error notification when ...
0
votes
1
answer
90
views
Detecting if running single or multiple tests with pytest in VS Code
It is easy to run a single test or multiple simultaneous tests with pytest in VS Code. I would like to suppress some time-consuming debugging output when running multiple tests in parallel. I know how ...
-1
votes
1
answer
260
views
Why can’t Google Colab kernel (via VS Code) access files from my local machine? [closed]
I was trying to connect Google Colab to my VS Code and I successfully did that but when connected to Colab kernel, I can't read files that are in my local machine. But in local Python environment the ...
Advice
0
votes
4
replies
104
views
How can I fix the Prettier extension?
I'm using the VSCode extension called Prettier to distinguish between text strings, but it doesn't seem to be working. I was using it 10 minutes ago and it was working fine, but when I closed the ...
0
votes
0
answers
114
views
Issue with virtual environment activation in VS Code on Windows 11
I am using a venv for my current Python project in VS Code 2022 on Windows 11. I started having issues when I tried installing nodeenv into my venv, and it kept installing globally despite me running
...
0
votes
0
answers
141
views
Visual Studio Code / Cursor terminal cannot handle Python comment with special characters
In a Python script there exists the following comment that shows the structure of an intermediate Polars data frame.
print('a')
# ┌──────────┬──────┬────────┬─────────────────┬────────────────────┬────...
0
votes
2
answers
96
views
Using VS Code Debugger gives "ModuleNotFoundError: No module named 'streamlit'" despite active venv
I'm developing a Streamlit app in VS Code. I have created a virtual environment (venv) specifically for this project, activated it in my terminal, and installed all requirements (including streamlit).
...
-2
votes
1
answer
150
views
Disable VSCode Debugging Info In Editor [duplicate]
I recently noticed this inline debugging info appearing when running Python in VSCode (see attached). In larger projects this can be assaulting visually with the screen full of debug info I'm not ...
2
votes
1
answer
453
views
Data Wrangler in Jupyter Notebook is not displaying
I've been using Jupyter Notebooks for a long time and when I run "df" to show the dataframe it used to be presented with Data Loader.
Today I noticed that it's not displaying anymore. I've ...
Advice
0
votes
3
replies
86
views
Terminal closing after outputting code result
I'm new to coding, and I'm trying to use VS code to learn Python. I had an issue when I ran the debugger. I got some extra output showing something like this:
PS C:\Users\user\Desktop\Python\oops> ...
Tooling
0
votes
0
replies
129
views
VSCode; RemoteSSH; Python; venv; .env - LD_LIBRARY_PATH
I feel sure I'm overlooking something fairly obvious...
I am using VSCode (1.109.5) on Windows with Remote SSH(0.122.0) to a Debian (12 Bookworm) remote server. I doubt the versions are especially ...
0
votes
1
answer
99
views
How to make my code use .venv, and not global pip packages? [duplicate]
I am learning python, and I learned that global pip packages are bad, because you should use Virtual Environments. So for my learning numpy project in vs code i created a folder .venv. I uninstalled ...
0
votes
1
answer
117
views
How to refactor all occurrences of a string into a variable in Python with VS Code
I want to do some refactoring of a single Python file in VS Code. I used a lot of hard-coded string literals, and I want to refactor them into constants so that I'm sure I'm using the correct keys.
...