Tag Archives: Torch code

[Solved] SystemError: Parent module ” not loaded, cannot perform relative import

The problem that peer modules can’t be called directly has not been solved by the relative import path solution on the Internet
finally, just put the file. Py in the new folder. By the way__ init__. Py related import statement
and then run
it’s strange that I used to associate. Py with__ init__. Py is put back under the same level file of import, or run
later I found that I changed two places, the root cause is not the same level or not the same level file!

Instead, the package calling the parent module should declare the upper folder of the folder where the file is located!

The final investigation is correct! It turns out that in the final analysis: