Closed mixern6 closed 1 month ago
This is the expected behavior of python import (https://docs.python.org/3/tutorial/modules.html#packages).
You cannot have multiple modules/packages with the same name. When python searches your path it stops at the first hit it finds, in this case it is the original folder you named ghidra, and it stops progressing down through the other folders to find the actual ghidra module (and then does not find the files it needs). Unfortunately you cannot have packages (typically folders) and modules with the same name in your search path, so your best bet is to rename the parent folder to anything other than ghidra.
By default your current working directory is included in the search path (https://docs.python.org/3/library/sys_path_init.html).
Pyhidra: 1.3.0 Python 3.12.6 OS: Windows 10
To reproduce:
Error:
If the "ghidra" folder is renamed, there is no error