解决pycharm中import包出现波浪线,但可以运行的问题
2019-07-26 本文已影响0人
ytt722
问题:pycharm中import包出现波浪线,但可以运行。
解决方法:
(1)file -- settings -- Project:(项目名) -- Project Interpreter,选择对应的环境。

(2)在Project Structure中,选择项目包,点击Sources,将项目包设置为源代码路径。

自此,问题解决!
(1)file -- settings -- Project:(项目名) -- Project Interpreter,选择对应的环境。
(2)在Project Structure中,选择项目包,点击Sources,将项目包设置为源代码路径。
自此,问题解决!