python - 没有名为 sys 和 time 的模块

标签 python import

我写了一个 GUI,为此我使用了这些导入:

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 *

sys和time下面有一条红线,我用的是pycharm community edition 4.5.3,它显示这个错误的原因是'no module named sys' 和time一样。 但是当我尝试运行它时,它运行得很好。

背后的原因是什么,它会影响我以后的代码吗?

最佳答案

将python解释器从python改为python2.7。它对我有帮助。

关于python - 没有名为 sys 和 time 的模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31716720/

相关文章:

python - 将 JSON 数据导入为 CSV 格式

typescript - 如何在 typescript 中禁用隐式导入

java - Eclipse:无法识别导入

Python Selenium 绕过检测?

Python: "foo() for i in range(bar)"是什么意思?

css - 将自定义 CSS 文件添加到 AdminBro 组件中

php - 无法使用 PHP 将 CSV 导入 MySQL

c++ - 使用 native C++ Qt 比 PyQt 有什么优势

python - 通过调用 unix-shell 命令在 python 中使用 Sftp

python - pyLDAvis .show 函数要求 Jupyter 笔记本中缺少 .css 文件