I installed python lately on my macos system and when I try to open a python file I see this error popup about Jupyter extension : Answer Just ran into this today (I’m on MacOS for my work computer). In my case, upgrading to the pre-release version of the Jupyter extension (v2022.5.1001281006) solved it right away. If you’re not an
Tag: visual-studio-code
Issues setting up python testing in VSCODE using pytest
I am trying to use the testing extension in VSCode with the Python extension. I am using pytest as my testing library. My folder structure looks like this: In the test_main.py file I am trying to import the package code, in order to test it: From the command line, in the root directory, PACKAGENAME, I can use the command python
Python Input function not Working in VS Code
When I run the code with the code runner extension the code shows in the terminal however when it gets to the input function it freezes like its asking me to input some data however I cant eve type a number or letter. This is what the terminal shows… Answer Code Runner shows results in OUTPUT and doesn’t accept inputs
Modules at VS code notebook [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question
how to activate virtual env in vs code?
I cant activate virtual env in vs code. I tried same code in the cmd console is work but not in the vs code terminal. “D:pythondjangoappdjangovenvScriptsactivate.bat” I write this code. I am using windows 10 pro Answer yeah Its beacuse of terminal vs code was using powershell ı changed with cmd
How to fix pylance syntax highlighting showing wrong color for self and cls python class parameters in VSCode with enabled default theme
I have encountered this issue when I use Pylance and syntax highlighting is enabled for python in the VSCode with default or the visual studio theme. self and cls parameter are LightSkyBlue color like other parameters It should be like this: Answer Added the color code inside of the settings.json file for the default dark theme. These two issues on
Jupyter notebook cell code not executing in VSCode when there is a file named random.py in the folder
I have just started using Jupyter notebooks in VSCode and have come across a strange issue. I made a folder for keeping my lab programs and there is a file named random.py in the folder. When I try to execute a code cell of my Jupyter notebook which is present in the same folder then I get an error ‘Kernel
VSCode does not recognize venv
When I create a new project and the virtual environment using the venv python package, VSCode doesn’t recognize the new virtual environment. I follow the bellow instruction: https://code.visualstudio.com/docs/python/environments The command that I use in the VSCode integrated terminal is: python -m venv .venv The terminal that I use is PowerShell 7, But I tried the CMD terminal too. After running
Python ImportError and ValueError in VSCode/pytest
This is what my project looks like (oversimplified): Whenever I run pytest standing in root/ I get ImportError : Attempted relative import with no known parent package. If I move test_code.py out to root/ everything works fine. But this is not an option since I have many modules and that is why I need to put ALL test modules inside
Search for a specific element in multiple pages and click using Python Selenium
Hi im trying to navigate from page 1 to page 5 (the element can be in any of the pages)and find and click on a specific element using python selenium. The following is the element from the page: <span _ngcontent-mtx-c123″” class”ng-star-inserted”>ABC Company</span> i tried by using : driver.find_element_by_name(“ABC Company”).click() but this doesnt work. Another Way i tried: I need the