I keep getting an error when running my program in VS Code

Question:

I have recently started coding and I am using Pycharm and VS Code.
I encountered a problem and I cant seem to find any soloution to it, and I am to fresh to figure it out myself.

I run this simple program:

count = 0
for number in range(1, 10):
    if number % 2 == 0:
        count += 1
        print(number)
print(f"We have {count} even numbers")

In Pycharm it works, but in VS Code it returns the error:

Traceback (most recent call last):
  File "d:CodingHelloWorldapp.py", line 2, in <module>
    from termios import CBAUDEX
ModuleNotFoundError: No module named 'termios'"

Does anyone one a clue what I need to do specifically?

The tutorial I am following is also using VS Code, and he doesn’t seem to encounter the same issue.

Asked By: Simen

||

Answers:

I went in there and I had these three lines printed in the top of my file:
from distutils.cmd import Command
from termios import CBAUDEX
from tkinter import FIRST.

I removed them and now I dont get the error anymore!

Answered By: Simen
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.