PSI using SNAP-STaMPS workflow in Windows Subsystem for Linux (WSL)

Can you replicate why the product from 09Dec2020 is in the stack twice?

i solve it i delete the product that stacks twice , but after doing the source i have this kind of problems

if the command is not found, please carefully check the StaMPS_CONFIG.bash file

1 Like

what can i do to check it , i download StaMPS-4.1-beta multiple times but still the same . . .

I think you didn’t set the path correct

you have to open this file and modify the variables as described here: StaMPS/1_stamps_setup.md · master · Matthias Schlögl / gis-blog · GitLab
You have to enter your own paths, of course, so that the location of the scripts is known.

1 Like

Hello, I have the same problem. The command “mt_prep_snap” does not recognize me.
Have you been able to solve it?
I have tried to do it using this [link](file:///C:/Softwares/snap_stamps_1_0/snap_stamps_1_0.html)
To know the location of the files you can use this: “whereis matlab snaphu triangle csh”

However, I still haven’t been able to get the command to recognize me. I have followed the steps as shown in the following images:

tar -xvf StaMPS-4.1-beta.tar.gz
cd StaMPS-4.1-beta/src
make
make install




Could it be that I still don’t have StaMPS installed correctly? Anyone have any solutions?

Thank you

Just try to install in the root, like below

sudo make
sudo make install

they try to run the mt_prep_snap command.

1 Like

Thank you very much for your answers. I have done it, but I get the same result 


Does it have to be run from a special folder?

I have repeated this but using root, 


ok then set the path in .bashrc file, like below (it is hidden file in /home/user/)

export PATH= /home/username/StaMPS_folder/bin:$PATH

bold one is your path of the StaMPS folder, change as per your path

Found the file “bashrc”

The file is in /root/.bashrc

However I can’t find “export PATH = / home / username / StaMPS_folder / bin: $ PATH”


Just follow these steps carefully,

In this same terminal (same path ) run these below commands

sudo make
sudo make install

Then enter one step back from src folder (using cd
) , then go to bin folder.

Type pwd command in terminal

Whatever path presented using pwd command will be set into .bashrc file (/home/user/)

You have to set the path

export PATH=copy the path (got from pwd command):$PATH

Then finally Type,

source .bashrc

Thank you very much for answering. I have tried but no luck 

I will show you what I did in the following pictures.



Now I have made some changes and I wrote it as follows

export PATH=$PATH::~/mnt/c/Softwares_i/StaMPS-4.1-beta/bin

However source .bashrc
“no such file or directory”

Now when typing mt_prep_snap it would seem that if it recognizes it

This should be source ~/.bashrc, but when a new instance of bash is started (e.g.,
but running a bash script, source ~/.bashrc is run automatically. The problems you encountered are typical for someone who is new to linux and command-line processing. From years of experience with workshops introducing command-line tools for ocean colour processing, we found it important to provides a couple afternoon “practical” sessions introducing and using basic linux command-line tools. Now there are many good references and online courses. One good references is LinuxCommand, but Ubuntu users can also use the excellent Debian User Manuals. Both these sources have translations to languages other than English.

Please enter the path manually into .bashrc file, like below

gedit ~/.bashrc

Enter the path in the last line (i mentioned already in the above)

Then

source .bashrc

Thank you very much for your help @suribabu and @gnwiii

On my pc I have several drives (c, d and e) The export command is run from drive c. And at the time of doing the instructions and typing “mt_prep_snap” it recognizes me, all very well so far.

However when I switch to drive e, which is where I have INSAR_20170310, the command “mt_prep_snap” no longer recognizes me.

I have to take the first steps in unit e?
Or what do I need to do to work on unit e?

Thank you very much for your help

This may work on a full Ubuntu installation, but not on a fresh install of WSL Ubuntu.
WSL Ubuntu doesn’t provide gedit (GNOME Desktop (graphical) text editor). nano (a basic text editor included in WSL Ubuntu) can be used in a WSL terminal. “source .bashrc” should be “source ~/.bashrc” on the default configuration of WSL.

2 Likes

Hello, I am very sorry to continue asking, but I have not yet been able to solve the problem. I hope you have patience.

Once the previous steps have been carried out:

cd /mnt/c/Softwares_i/StaMPS-4.1-beta/src
sudo make
sudo make install
cd /mnt/c/Softwares_i/StaMPS-4.1-beta/bin
export PATH=$PATH::~/mnt/c/Softwares_i/StaMPS-4.1-beta/bin

Will the export command only be used once? or is it necessary to carry out more export?

source ~/.bashrc

If from this path I run the mt_prep_snap command, it recognizes it
The problem is when I leave the path “cd /mnt/c/Softwares_i/StaMPS-4.1-beta/bin” the mt_prep_snap command no longer recognizes me. The folder where I am working is on drive E. For this reason I cannot continue with the following steps
How could I solve this?

On the other hand, I have reviewed several sites (1 and 2) in order to understand more about the working process between snap and stamps.

On these sites they modify the .bash file
Is this necessary to do it or does the export command do it?

I told you several times just add the path in .bashrc file, not in terminal.

Follow these below steps carefully

$ cd

Hopefully you will find .bashrc file in this

$ ls .bashrc

If you will get it the .bashrc file, open the file using below command

$ nano .bashrc

Just add below line in the last of .bashrc file(inside the file not in terminal)

export PATH=/mnt/c/Softwares_i/StaMPS-4.1-beta/bin:$PATH

And save the file using (clt+x)

Then type

$ source .bashrc

All started with $ are commands.

1 Like

Again, the problems you are encountering indicate lack of command-line experience. A few hours spent with a tutorial building some command-line experience will be amply repaid.

1 Like