Python multi-tier folder imported py file, package could not be found

/ A /
/ A/a1
/ A/a2
/ B /
/ B/b1
/ B/b2

the in.py sheet introduces A1 Magi A2 under A folder, or b1 Magi B2 under B folder; both are fine

but I need to introduce the b1 br b2 of the B folder in A (this step has been solved)

and then introduce the package in An in in.py (this step leads to an error: NO Module named)

how to solve this problem

Apr.13,2022

the first step is to create _ _ init__.py in folder A, and an empty file can be

.

the second step is to import from An import * into in.py. According to my test, the general folder name should not be a single character, do not conflict with the system folder name, and try to avoid unpredictable problems

.
Menu