1

My project structure:

project
    main.py
    modules
        client.py
        server.py
        find_host_ip.py

Traceback:

File "C:\...\main.py", line 1, in <module>
from modules import client, server
File "C:\...\modules\client.py", line 2, in <module>
from find_host_ip import Network
ModuleNotFoundError: No module named 'find_host_ip'

What's wrong?

1 Answers1

3

You need to use full path to module, or you can place modules in root directory, and you don't have to change the code:

from /modules/find_host_ip import Network 
Maxim Kuskov
  • 250
  • 1
  • 5