I have been working with Learn Python The Hard Way and I'm stuck at example 48. In example 47 I had to create directories that look like this:
skeleton
|--ex47
|--module.py
|--__init__.py
|--tests
|--ex47_tests.py
|--__init__.py
From now on I had to import ex47/module.py into tests/ex47_tests.py. I received the 'No module named ex47' error. The solution for this problem was to add path of ex47 directory to site-packages by adding two lines of code into module.py:
import sys
sys.path.append('./ex47')
And this worked fine. I could import module.py to ex47_tests.py and I can import it anywhere on my computer.
After moving to example 48 I created exactly the same directories, files, I added path to ex48/ and I keep receiving the 'No module named 48'. I searched internet for different solutions, none of them is working. Adding __init__.py into skeleton doesn't help.
This issue is super basic matter, however it is not introduced to new python programmers. By the way, I want a solution that would work on any computer that would work with my code.
Do such issues occur in Linux?