Traceback (most recent call last):
File "/home/pc/.vscode/extensions/ms-python.python-2022.8.0/pythonFiles/testing_tools/run_adapter.py",
line 17, in <module> from testing_tools.adapter.__main__ import parse_args,
main File "/home/pc/.vscode/extensions/ms-python.python-2022.8.0/pythonFiles/testing_tools/adapter/__main__.py",
line 9, in <module> from . import pytest,
report File "/home/pc/.vscode/extensions/ms-python.python-2022.8.0/pythonFiles/testing_tools/adapter/pytest/__init__.py",
line 7, in <module> from ._discovery import discover
File "/home/pc/.vscode/extensions/ms-python.python-2022.8.0/pythonFiles/testing_tools/adapter/pytest/_discovery.py",
line 8, in <module> import pytest
ModuleNotFoundError: No module named 'pytest'
Discussed in #19316
Originally posted by ProfessorCode212 June 16, 2022
I get the following uncaught error for the Python Extension in VS Code. This only happens inside
venv. It doesn't seem to be able to detect my system-widepytestinstallation. I have even setpython.testing.pytestPathto~/.local/bin/pytest.This problem does get fixed if I install
pytestinto the relevantvenvbut I am wondering if there is a way around it.