简体   繁体   中英

IntelliJ idea Python3 code index error

There are common.py, environment.py and evaluation.py in the same directory and the Python version is 3.6 but in IntelliJ idea with Python plugin, Unresolved reference error is raised as you can see in the following picture 1.

图片1

And after changing common to .common , there is no error as you see in the following picture.

图片2

But the code cannot be run under Python 3.6, how can I change IntelliJ idea settings so that files can be indexed under the same folder and no errors will be reported in picture 1.

您需要确保在项目结构对话框中,将包含common.py的目录标记为源根。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM