There is no module named sys and time

I wrote gui code because I used these imports,

import os import sys import serial import scipy import string import time import datetime import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl from collections import deque from numpy import array from pylab import xlabel, ylabel, subplot from scipy.fftpack import fft from pylab import * 

there is a red line below sys and time, I use the pycharm 4.5.3 community, it shows the reason for this error: "there is no module named sys" and the same for time. but when I tried to run it, it works fine. what is the reason for this and will it affect my code in the future?

+4
source share
2 answers

Change python interpreter from python to python2.7. It helped me.

+2
source

This is what I came across with Intellij 2017.3.4, where he could find every module except sys and time in the editor, but everything will work fine. I had version 2.4 and 3.5 for python, and it didn't seem to be what I chose as the SDK. I tried to add and remove them.

When I went to Project Structure -> Platform Settings -> SDKs -> Python 3.5 -> Packages, he requested a warning that Python packaging tools not found. and had an install link. I installed it, and the editor no longer complained about time and time. When I switched the SDK to 2.7 (without installing packing tools), he again complained.

So, I'm not quite sure what is going on, which seemed to fix it for me, that other people are facing this problem.

0
source

All Articles