Hey there!
I am new to Sentinel-2 data and the processing procedures using the Sentinel-2 Toolbox.
According to the guides I installed Anaconda (Python 2.7) under ‘Program Files’ (C:), installed Snap 4.0. Then I checked if the Python version was correct. Next, I used the cmd to install sen2cor with ‘python setup.py install’.
After all of this was done, I wanted to check if L2A_Process would work and it did not. Entering ‘L2A_Process --help’ just gave me the results that it could not be found…
Well, it just gives me the typical Windows cmd output, that appears if the process or file that I just typed in, does not exist.
Is there a way to check if Sen2Cor was installed correctly?’
If I try it directly in SNAP, this is the Error Message:
Traceback (most recent call last):
File “C:\Python27\Lib\site-packages\sen2cor-2.2.1-py2.7.egg/sen2cor/L2A_Process.py”, line 7, in
from tables import *
ImportError: No module named tables
Process exited with value 1
Finished tool execution in 11 seconds
Alright I just solved the issue with an answer from another thread by eblondel. It seems that the sen2cor package was simply installed in the wrong python directory (python27 and not in the anaconda2 directory). The explanation in the setup.pdf provided is a bit misleading in this case.
“Open anaconda 2 command prompt then unzip the sen2corr package in the
same folder of anaconda2 under the users folders then
C:…\Anaconda2\python.exe setup.py install.”
Hey!
Another error just came up. After everything was set up properly I tried to run the process. My goal was to process a single tile (one of the folders inside the GRANULE folder). I started the processes from within the GRANULE folder with this command:
Actually I installed Sen2Cor correctly executing the setup.py with the Python.exe in the Anaconda directory, but I get the same error you got…
Traceback (most recent call last):
File “C:\Anaconda\Lib\site-packages\sen2cor-2.2.1-py2.7.egg/sen2cor/L2A_Process.py”, line 7, in
from tables import *
ImportError: No module named tables
Process exited with value 1
Finished tool execution in 6 seconds
I tried to run sen2cor from the snap platform for aa sentinel-2 product
But the installation has been done properly . What could be the problem then?
Else regarding processing only a tile: You need to process with the full structure. This means you need to be in the main directory. If you only want to process one tile of the whole dataset, then you can delete the other *N02.02 folders in GRANULE or move them together in a subfolder, then sen2cor should ignore them.
Honestly for me putting a “=” before the chosen resolution value make it works from.command shell. Have you got any idea about why sen2cor does not work.if started from the integrated plugin of SNAP 4.0
So for me the problem was that Anaconda was installed under C:, which then probably led to administrative issues. Additionally, I had to install tables and numpy manually (pip install numpy/tables).
The processing works from the cmd now. I haven’t tried it in Snap again since it’s more convenient for me this way.
And the missing “=” didn’t make any difference for me… it works with AND without.
@antonio19812: Maybe your problem could also be related to the system variables and their definition. Just check some other threads in the forum. There were a lot of people facing this problem.