We are trying to install the sen2cor processor in SNAP in order to perform atmospheric corrections in S2 LC1 products.
We first tried to directly install the plug-in through the SNAP/tools/plugins, but, as it is mentioned in some similar posts in this forum, it is required to first install the sen2cor processor independently from SNAP. Therefore we followed the procedure described in the Telespazio Vega User Manual, p. 29. Using a Win-7 64bit computer, we did the following:
Install of Anaconda2 - 2.4.1v 64 bit (2.7 Python); all install options as default (e.g. in “Advanced options”, we accepted both options): successful installation.
Install of sen2cor via the unzipped folder “sen2cor-2.0.6”, which was opened in the command prompt to perform the call python setup.py install. At the end of the installation, as suggested by the manual, we kept the home directory as default.
2.1) The installation of sen2cor looks successfully complete. However, looks like the installation have failed in recognize the path for the environments _DATA, _HOME and _BIN (see attached image below).
2.2.) Despite the setting environment message above, we successfully tested the processor via the call 2A_Process --help, as indicated by the manual (see attached image below):
Once we “successfully” installed sen2cor, we downloaded the plug-in from SNAP/tools/plugins and tested it with a S2 LC1 product. We got this error message:
Before executing the tool, please correct the errors below:
Variable SEN2COR_HOME is not set
Variable SEN2COR_BIN is not set
Which automatically opens a sen2cor window with adjustable parameters for the system variables, in which the value for the keys HOME and BIN are empty, while the value for the PYTHON_BIN is “python_exe”.
Do you have any comment of how to solve this issue and therefore install the sen2cor environments properly? We are new to S2 toolbox and we are not python experts. We think there might be an error in the ways the paths are located and tracked, but perhaps is something far more simple!
i think you sholud uninstall sen2cor and Anaconda. By commandline use pip uninstall sen2cor (click yes) and next delete folder with environment settings (if was created) Next uninstall Anaconda and install again in properly path (dont change path. Installer ought to want install anaconda in C disk folder Anaconda2). Install again sen2cor.
You should be able to update the SEN2COR_HOME and SEN2COR_BIN by double clicking on the “value” field.
SEN2COR_HOME in your case should be set to C:\Users\Frans_Home\documents\sen2cor
SEN2COR_BIN should be set to C:\Users\Frans_Home\Anaconda2\Lib\site-packages\sen2cor-2.0.3-py2.7.egg\sen2cor
However something is not right since these variables should be set automatically by the Sen2Cor installation, and you should see these paths with “echo %SEN2COR_HOME%” and echo “%SEN2COR_BIN%”
After uninstalling and reinstalling SNAP, Anaconda and Sen2cor and configuring the path, I tried to perform the sen2Cor process on S2A data and ended up with this error message, would anyone help me out please?
Excuse me ABraun , i installed sen2cor standallone version in window command prompt.
These are the environmental variables. I have also installed snap.
I tried many times to atmospherically correct an image of sentinel 2 through the commant prompt and sen2cor but it didn’t work.
Can i do the correction through snap as the sen2cor has succesfully been installed?
i tried again many times. At the end after 1 or 2 hours of processing ,the sen2cor terminated succesfully (resolution 20m) . From the new file that has been created the only image that opens in snap , is the MTD_MSIL2A. I suppose that this is the atmospherically corrected image. About the resolution of 10 m there is an error about the memory.
I run again sen2cor for 10 resolution and its fine!
The standalone version is super, easier and faster to install!!!
I can understand that i am not expert so i consume your time.
Thanks in advance