First we have to jump to the same level as the Account file import sys sys.path.append('..') Call the sys module, sys.path returns the search path of the module, and use the PYTHONPATH environment variable during initialization Value .. Jump to the upper level directory Then you can directly import account.py from mns_python.mns Note: mns_python needs to have the __init__.py file (I got stuck here - I hope everyone can take this as a warning) )
First we have to jump to the same level as the Account file
import sys
sys.path.append('..')
Call the sys module, sys.path returns the search path of the module, and use the PYTHONPATH environment variable during initialization Value
.. Jump to the upper level directory
Then you can directly import account.py from mns_python.mns
Note: mns_python needs to have the __init__.py file (I got stuck here - I hope everyone can take this as a warning) )