visual-studio-code

I have a problem with python in vsCode: TypeError: …. is not a function

I have a problem with python in vsCode: TypeError: …. is not a function Question: In VS Code, the latest Pylance extension (v2023.10.50) failed with this error: TypeError: _0x2f33cc[(_0x1efd68(…) + _0x1efd68(…))] is not a function (When I highlight on any line of code). I tried to delete some suspected libs but nothing happened. Asked By: …

Total answers: 1

Minimum package requirements to run a jupyter notebook in vscode

Minimum package requirements to run a jupyter notebook in vscode Question: Recently I keep running into problems with my python notebooks in vscode where vscode doesn’t see the installed ipykernel. There are several posts on this issue with suggestions to update certain packages (VSCode not picking up ipykernel, Python requires ipykernel to be installed, vscode …

Total answers: 3

Import "numpy" could not be resolved; ipynb in vscode

Import "numpy" could not be resolved; ipynb in vscode Question: Im in trouble with using umpy module in ipynb(jupyter notebook) file in vscode, it doesn’t work only in ipynb file. If I make new .py file and import modules, no error comes out. Could anybody tell me why this happens? Asked By: COTHE || Source …

Total answers: 1

Cannot run updated file from terminal of VSC, for Python

Cannot run updated file from terminal of VSC, for Python Question: So to make it very simple. If I write print("Hello World") and run it on the RUN icon on top right corner it works perfectly fine. And only then if I type in terminal python hello.py executes again just fine. But if I change …

Total answers: 2

Cannot activate virtual environment in vscode

Cannot activate virtual environment in vscode Question: I’ve made a virtual environment that looks like this: When I run the following line it gives me an error: PS C:UsersuserDocumentsCodeflaskTutorial> envScriptsactivate But when I run this line nothing happens? PS C:UsersuserDocumentsCodeflaskTutorial> envScriptsactivate.bat I’ve read that windows doesnt run .bat files, but how do I activate my …

Total answers: 2

vscode python gettext : Pylance reports undefined variable '_'

vscode python gettext : Pylance reports undefined variable '_' Question: In a localized program I use gettext.install() in the main modul src/testgettext.py. The documentation (python 3.10.7) says gettext.install(domain, localedir=None, codeset=None, names=None) This installs the function _() in Python’s builtins namespace… The code import gettext gettext.install("any") de = gettext.translation(‘testgettext’,localedir="src/locales", languages=[‘de’]) de.install() print(_("Selected Files:")) functions as awaited, …

Total answers: 2

I want to execute python in VS code. But VS Code Right Click not showing "Run Python File in Terminal" or "Run Selection/Line in python Terminal"

I want to execute python in VS code. But VS Code Right Click not showing "Run Python File in Terminal" or "Run Selection/Line in python Terminal" Question: I have installed VS Code version 1.71.2. I have installed extension Python and Code Runner. Python programs are getting executed thru command prompt. Commend prompt python I opened …

Total answers: 2