Why isn't this import statement working, even after I created __init__ in every folder?

I want to import func1() from basepackage\package1\p1\p1py.py. The root folder basepackage is located on my desktop.
import package1.p1.p1py
import basepackage.package1.p1.pipy as okay '''this king of import statement is showing error'''
okay.func1()
package1.p1.p1py.func1()
The code above doesn't work, and throws the following error:
File "c:\Users\shiv\Desktop\basepackage\package1\p11\p11py.py", line 1, in <module>
import package1.p1.p1py
ModuleNotFoundError: No module named 'package1'
Within the package you need to use relative imports rather than importing from the package name itself (that will only work if the package is already installed in your Python path).
For example, if I have a package set up like:
and
p1py.pycontains:Then, if you wanted
p11py.pyto be able to usefunc1, then you could have it contain:Then, within the
basedirectory, you can do:See, e.g., Relative imports for the billionth time for links to various other questions/answers about relative imports.