It’s a forum. I think all sort of questions may be asked… Perhaps my question should have been in “General” - tag : “Python”. My appologies if this is the case…
The “from densify import dens_coarse” command returns this error :
Python error: ModuleNotFoundError(“No module named ‘densify’”,)
I don’t have this issue when using Python in PyCharm, Spyder, etc. Seems like it only happens in FLAC3D.
I know it’s an old question, but in case it could help.
My guess is that it’s only a matter of path environment variable: when importing a module in Python, it looks in the folder Python is executed from, and in its library folders (the defaults are %ProgramFiles%/Itasca/FLAC3D/exe64/python36/Lib and the site-packages subfolder in there).
If the module you’re trying to import is not in these, you’ll get an ImportError.
When executing from PyCharm, Spyder…, I guess the densify.py is in the folder you execute Python from. However, the execution folder of FLAC3D might not be this one (default is %ProgramFiles%/Itasca/FLAC3D/exe64).
If you wish to import a Python module from anywhere, you have to hardcode the path Python should look into in the script you’re executing (say MASTER.py) :