I’ve reproduced this process and hope the following steps could help you

1.Activate the venv and install simplejson;

2.Run the helloworld.py in Terminal to make sure the script no error;

enter image description here

3.Configure the tasks.json, pay attention to use the venv’s pythonpath;

"version": "2.0.0",
    "tasks": [
        {
            "label": "run python file",
            "type": "shell",
            "command": "/venv's pythonpath/ helloworld.py",
            "group": {
                "kind": "test",
                "isDefault": true
            },
            "problemMatcher": [
                "$tsc"
            ]
        }
    ]

4.Tasks:Run Task;

enter image description here

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top