Cannot set sen2cor environment variables on OS X (SEN2COR_HOME etc)

Hi all,

I’m having multiple problems trying to get sen2cor working on a Mac. First off I am have a similar problem to those discussed in sen2cor on Mac OSx - I have successfully installed sen2cor and the plugin but when I try to run it from SNAP I get the error that SEN2COR_HOME and SEN2COR_BIN are not set.

At this point SNAP pops up the “Adapter Editor” which seems to have some graphical bugs, looking like this:

If I try and click OK on this I get the following message:

If I check in my Mac with printenv then this variable is indeed set, so I’m not sure what to do now. I’m using the SNAP and sen2cor latest versions (downloaded today) so I’m quite lost. I wonder if I need to set “System Variables” in the “Adapter Settings” window but when I click the “Add Variable” button nothing happens.

Many thanks in advance for your help!

It seems that sen2cor was not installed properly. Seeing that you posted this 13 days ago, it could be because of the anaconda version that you used to install sen2cor. You probably installed Anaconda3, which uses python 3.5 by default and does not support some packages required for sen2cor.

You could try to either

  1. Uninstall and reinstall Anaconda (NOT Anaconda 3) and repeat the sen2cor installation as per the instructions in the pdf or
  2. Try to create an environment with python 2.7 in your Anaconda3, then repeat the sen2cor installation. Remember to uninstall sen2cor before trying to install it again.

I am trying this myself to see it it works.