import math时,math在pycharm中标记为红色,提示no module named math,运行程序正常

解决方法

(1)在file-->Settings-->Project:python--->Project Interpreter,点击Show All

PyCharm:no module named *_运行环境

(2)选中当前环境,然后点-,删除此运行环境后,重新添加即可

PyCharm:no module named *_python_02