I created a package like this:
└─dd
a.py
b.py
__init__.py
a.py
and __init__.py
is empty.
b.py
is:
from dd import a
When I run the b.py
, I get the error message:
from dd import a ModuleNotFoundError: No module named 'dd'
Why the dd
package can't be recognized ?
UPDATE1
The reason I do this is that after I published my package to PyPl, and then, I imported it, but it reports the error that it can't recognize the module which is in the same package.
For example, if I do it like this:
# b.py
import a
then publish the dd
package to PyPl
pip install dd
If I try from dd import b
, it will report the error that it doesn't kown what is a
So, how to solve this problem ?