Replies: 1 comment 1 reply
-
Hi, This is an error with the header of the MintPy files. Please add #!/usr/bin/env python3 in the first line of the following scripts:
It should fix your error. However, I will report this issue to the MintPy team. Kind regards, Alexis |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
I was trying to install everything according to the Tutorial and it looks like everything is installed fine, I am able to test ISCE (topsApp.py -h) and also STamPS (mt_prep_isce). However if I try any of the MintPy files (smallbaselineApp.py -h, solid_earth_tides.py -h, and tropo_pyaps3.py -h) I first get the error message "Permission denies". I then changed (chmod) the smallbaselineApp.py and now I'm getting the following error messages (command not found):
/home/mathyst/tools_insar/proc_insar/MintPy/src/mintpy/smallbaselineApp.py: line 8: import: command not found
/home/mathyst/tools_insar/proc_insar/MintPy/src/mintpy/smallbaselineApp.py: line 9: import: command not found
/home/mathyst/tools_insar/proc_insar/MintPy/src/mintpy/smallbaselineApp.py: line 10: import: command not found
/home/mathyst/tools_insar/proc_insar/MintPy/src/mintpy/smallbaselineApp.py: line 11: import: command not found
/home/mathyst/tools_insar/proc_insar/MintPy/src/mintpy/smallbaselineApp.py: line 13: import: command not found
/home/mathyst/tools_insar/proc_insar/MintPy/src/mintpy/smallbaselineApp.py: line 15: import: command not found
/home/mathyst/tools_insar/proc_insar/MintPy/src/mintpy/smallbaselineApp.py: line 16: from: command not found
/home/mathyst/tools_insar/proc_insar/MintPy/src/mintpy/smallbaselineApp.py: line 17: from: command not found
/home/mathyst/tools_insar/proc_insar/MintPy/src/mintpy/smallbaselineApp.py: line 24: syntax error near unexpected token
(' /home/mathyst/tools_insar/proc_insar/MintPy/src/mintpy/smallbaselineApp.py: line 24:
def get_the_latest_default_template_file(work_dir):'Here's the echo of my PATH if it helps:
/home/mathyst/.local/bin:/home/mathyst/mconda/miniconda3/envs/InSARenv/bin:/home/mathyst/mconda/miniconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Users/mathyst/AppData/Roaming/MobaXterm/slash/bin:/mnt/c/Windows:/mnt/c/Windows/system32:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files/dotnet:/mnt/c/Program Files/MATLAB/R2021b/runtime/win64:/mnt/c/Program Files/MATLAB/R2021b/bin:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/Users/mathyst/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files/snap/bin:/mnt/c/Windows/sysnative:/home/mathyst/tools_insar/proc_insar/MintPy/src/mintpy:/home/mathyst/mconda/miniconda3/envs/InSARenv/lib/python3.11/site-packages/isce/bin:/home/mathyst/mconda/miniconda3/envs/InSARenv/lib/python3.11/site-packages/isce/applications:/home/mathyst/tools_insar/proc_insar/isce2/contrib/PyCuAmpcor/examples:/home/mathyst/tools_insar/proc_insar/isce2/contrib/stack/topsStack:/home/mathyst/tools_insar/proc_insar/StaMPS/TRAIN/bin::/home/mathyst/tools_insar/proc_insar/MintPy:/home/mathyst/tools_insar/proc_insar/isce2/contrib/stack:/home/mathyst/tools_insar/proc_insar/StaMPS/bin:/usr/bin:/usr/bin:/home/mathyst/tools_insar/proc_insar/isce2/contrib/timeseries/prepStackToStaMPS/bin:/home/mathyst/tools_insar/EZINSAR/EZINSAR_BIN//Suppfunctions/:/home/mathyst/tools_insar/EZINSAR/EZINSAR_BIN//3rdparty/
I also changed the MintPy PATH variables so that it leads to the *.py files that are in my case located under "home/mathyst/tools_insar/proc_insar/MintPy/src/mintpy. Here's the copy of my config file:
root directory
EZINSAR_HOME=/home/mathyst
export tools_insar=$EZINSAR_HOME/tools_insar
export TOOL_DIR=$tools_insar/proc_insar
export DATA_DIR=$tools_insar/data #put the wheather model data (ERA5)
echo "source $tools_insar/config_InSARenv.rc"
##########################################################################
if [ -z ${PYTHONPATH+x} ]; then export PYTHONPATH=""; fi
##-------------- MintPy -------------------------------##
export MINTPY_HOME=${TOOL_DIR}/MintPy
export WEATHER_DIR=${DATA_DIR}/aux
export PYTHONPATH=${PYTHONPATH}:${MINTPY_HOME}
#export PATH=${PATH}:${MINTPY_HOME}/mintpy
export PATH=${PATH}:${MINTPY_HOME}/src/mintpy
##-------------- ISCE2 --------------------------------##
ISCE_HOME/STACK are set by conda
export PATH=${PATH}:${ISCE_HOME}/bin:${ISCE_HOME}/applications
#echo "load ISCE-2 core modules installed by conda at "$ISCE_HOME
common settings (source stack processors and PyCuAmpcor)
export ISCE_STACK=${TOOL_DIR}/isce2/contrib/stack #set ISCE_STACK to the dev version
export PATH=${PATH}:${TOOL_DIR}/isce2/contrib/PyCuAmpcor/examples #for cuDenseOffsets
export PYTHONPATH=${PYTHONPATH}:${ISCE_STACK} #import tops/stripmapStack as python modules
export DEMDB=${DATA_DIR}/aux/DEM
export PATH=${PATH}:${ISCE_STACK}/topsStack
I really don't know why it doesn't work, it seems to me that everything is correct.. Would be very greatful for some help :)
Cheers and thanks for this great tool!
Tamara
Beta Was this translation helpful? Give feedback.
All reactions