Python Module 8 Error: I am not able to import objects from other subpackages

Hi, I’m a beginner to Python. Mosh’s course has helped me immensely, but there is one problem I can’t seem to resolve, in the Modules section of Mosh’s Python course, specifically video #8: Intra-package References.

Lets say I have a main package called A , which has two subpackages called B and C . B has a python file called X.py and C has a python while called Y.py . A, B and C all have the empty files init.py (which is necessary to make them a package). Y.py has an object called ExampleClass. I want to be able to import ExampleClass in X.py . So according to tutorials I should write the following:
from A.B.X import ExampleClass
from …B.X import ExampleClass
(same for functions but I didn’t write that to avoid repetition)

But both of these aren’t working for me, both on PyCharm and Python IDLE and I get an error saying there is no module named ‘A’. Is this command no longer supported on Python or there is an issue with my device?

I am getting the same error. Did you make it work? @Armaan.Tufail

Unfortunately not. Seems like it’s just not possible.