How to import python file located in same subdirectory in a pycharm project

前端 未结 8 1616
盖世英雄少女心
盖世英雄少女心 2020-12-13 08:48

I have an input error in pycharm when debugging and running.

My project structure is rooted properly, etc./HW3/. so that HW3 is the root di

8条回答
  •  情深已故
    2020-12-13 09:11

    For me the issue was, the source directory was marked correctly, but my file to import was named starting with numeric value. Resolved by renaming it.

    import 01_MyModuleToImport
    

    to

    import MyModuleToImport
    

提交回复
热议问题