Specify system variable PYTHON_BIN for Sen2Cor

that is basically good. It means that sen2cor works on your PC

the only thing which is missing yet is the SNAP integration. So you either have to find the correct path for your folders.

Where is your Anaconda installation? For me it is this, for example:

And I wonder why it is under AppData\Local in your case.

What happens if you simply type python in your command line?

When typing python on my command line, I get this:

that’s also good.

Try replacing the PYTHON_BIN in SNAP (manage external tools) with
c:\Users\sara aparicio\AppData\Local\Continuum\Anaconda2\python.exe
instead of just python.exe

and then try to run it again in SNAP.

1 Like

Hi @Sara.Aparicio,

I suggest you go inside SNAP/ Tools/Manage External Tools the select sen2cor and click edit.

In the screen that would appear 2 items need your attention 1) Configuration Parameters and 2) System Variables.

I have attached sceenshots for what should be there (adapt to your computer). Please note that for $PYTHON_BIN you have to navigate (click …) to the python2.7 under your Anaconda2 directory.

If this doesn’t work I would advice to remove sen2cor and re-install it again.

1 Like

@Ghanisen @ABraun
I changed to that, but strangely it seems that it doesn’t get updated.
I close and opened again the manager tool, and if I got to the value, it what I wrote, but not on the system variables display:

Hi @Sara.Aparicio,

It is not on the System variables screen that you set the path to the python executable, it is in the Configuration Parameters screen as I showed in my previous comment.

The python executable, for me python2.7 is in the bin folder under the Anaconda2 directory. Please follow the indications in my previous comment.

One last thing; what operating system are you using?

1 Like

@Ghanisen I followed your instructions:

And finally it seems it works!

Thank you very much @Ghanisen and @ABraun! !

Glad we could help @Sara.Aparicio.

1 Like

In my case, there was no variable found as python_bin in the system environmental variables. so i tries to replace the path in sen2cor system variable–python_bin as the path of python.exe file which was in anaconda 2. Still i was unable to run one particular dataset, while the other datasets were processed.

could it be that the data set is not complete? Did you compare the size of the folders?

Yes it is complete.

can you send me the name of the data please so I can check it myself?

I have downloaded the data set again though it was showing full file size…now it was running…

Many Thanks for your support and for spending your valuable time.

Thank You for your nice explanation. Would you be so kind to please let me know the procedure for Ubuntu 16.04 as well. Waiting for your kind reply.

I am getting this error. And always output is exiting with one…earlier i use to get output correctly but now i was unable to figure out this error…can anybody help me out please…

I suspect this is because of python path. My python path is this…

My configuration parameter window looks like this…

I also have the same issue…If i run the tool for only one band, then it is running like this…

And if i replace the source to dataset then it is giving this error…

please use sen2cor version 2.4. It is a standalone package and has all dependencies and requirements. No separate Anaconda/Python required any longer.

I am receiving this error, is there any one who can help me ?

which version of SNAP are you using? There is a new version 6 since a couple of days which includes sen2cor without having to set variables manually.

You can enable the option “Display execution output”. This might show some reason.
Also, you can look into the log file. You find it by selecting from the menu “Help / Show Log Directory”.