Jul-01-2024, 07:52 AM
(This post was last modified: Jul-01-2024, 07:52 AM by Gribouillis.)
I think your problem is the status of the pyfiles directory:
- Is pyfiles just a directory containing Python modules that you want to import? In that case, it should not have an
__init__.py
file and it should be on the Python modules search path as @AdamHensley wrote above.
- Or is pyfiles a Python package containing submodules? In that case
unimesh.py
should havefrom . import athena_read
instead ofimport athena_read
site-packages
directory a file with the .pth
extension containing the path to your directory, for example# in file mypythondirs.pth /home/raman/Pictures/MikiForRaman/pyfilesIf you are using your system Python interpreter, you can put that file in the directory printed by the command
python -c "import site; print(site.getusersitepackages())"
. If not, you can store it in one of the directories printed by python -c "import site; print(site.getsitepackages())"
« We can solve any problem by introducing an extra level of indirection »