Receiving Import Error: No Module named ***, but has __init__.py

后端 未结 4 1889
無奈伤痛
無奈伤痛 2021-01-02 04:24

I understand that this question has been asked several times but after reading them, and making the suggested fixes, I\'m still stumped.

My project structure is as f

4条回答
  •  醉话见心
    2021-01-02 05:17

    Try adding a sys.path.append to the list of your imports.

    import sys
    sys.path.append("/Project/src/")
    import root
    import root.nested.tests
    

提交回复
热议问题