Problems while test sen2cor directly after installing sen2cor


I work in conda with python2.7 and wanted to install sen2cor. My os is Linux Mint 18. I followed this instruction [x] .
The command python install runs without problems. After this call the script with <...>/sen2cor/L2A_Bashrc.

When I tried to test it with L2A_Process --help I got the following Error:

Traceback (most recent call last): File "/home/mara/anaconda3/envs/wolken/bin/L2A_Process", line 11, in <module> load_entry_point('sen2cor==2.3.0', 'console_scripts', 'L2A_Process')() File "/home/mara/anaconda3/envs/wolken/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/", line 565, in load_entry_point File "/home/mara/anaconda3/envs/wolken/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/", line 2598, in load_entry_point File "/home/mara/anaconda3/envs/wolken/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/", line 2258, in load File "/home/mara/anaconda3/envs/wolken/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/", line 2264, in resolve File "/home/mara/anaconda3/envs/wolken/lib/python2.7/site-packages/sen2cor-2.3.0-py2.7.egg/sen2cor/", line 7, in <module> from tables import * ImportError: No module named tables

Then I tried it manually via source L2A_Bashrc, but I got the same error. :unamused:

I don’t know what went wrong.

can you please enter pip list in your command line and see if tables is listed?
If not you can use pip install pytables

Hi, I determined a mistake in my question, but I edited it.

My table after using pip list:

DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning. contextlib2 (0.5.4) funcsigs (1.0.2) GDAL (2.1.0) Glymur (0.8.6) mock (2.0.0) numpy (1.11.2) pbr (1.10.0) pip (9.0.1) sen2cor (2.3.0) setuptools (27.2.0) six (1.10.0) wheel (0.29.0)

if you had already installed Python before you may be missing lots of required packages, including tables.
This is why it is stated in the manual that a full installation of Anaconda2 is advised.


I’m not sure if I get what you want to suggest for solving the problem.
I created an anaconda - environment with python2.7 and while using this I tried to installed sen2cor. I thought this is what the second bullet means.

yes, exactly. Sorry, I understood that you already had python installed from another source. In this case the required packages should be included and your pip list should be clearly larger.

Did you get it from here:

I would try reinstalling Anaconda2 again.

Ok. I think I got my problem, but I have a question. I think I downloaded the python3.5 version of anaconda and created a python2.7 environment. (with conda --v I only see my version and not if it’s anaconda2 or anaconda3).

But before I will download anaconda2: did you know if I can use both? Anaconda2 and Anaconda3? I ask this because I have a lot of struggles with different python versions.

Both Anaconda2 and Anaconda3 are capable of hosting python 2 and python 3 environments. If you install sen2cor into the anaconda root environment (as per the instructions), it must be Anaconda2 (python 2.7). However, you should be able to create a python 2.7 environment within Anaconda3 and install sen2cor there (I don’t know if there are instructions for how to do this, and then how to link snap to the correct environment).

Dear ABraun,
I had installed the Anaconda 4.3.1 and the Sen2cor 2.3.1. When I entered L2A_Process --help in the command line ,it printed that " No module named osgeo.gdal_array ". Then I entered pip list in the command line, I found no GDAL in the pip install pytables. How can I solve it?

do you have QGIS installed on your PC?

I didn’t install QGIS, but it printed that ‘installation sucessfully performed’ with an inport error: No module named osgeo.gdal_array.

can you type:
pip install gdal

Dear ABraun,
When I type pip install gdal in the command line, the screen prompts an error.Maybe I need to install Microsoft Visual C++ 9.0, I’ll try it again.Thanks for your help.


Dear ABraun,
When I installed the Microsoft Visual C++ 9.0,it still prompted some errors. So I can’t successfully install the GDAL. Could you please give me some advice to solve it? Thanks in advance.

I once had similar errors (“cl.exe failed with exit stats 2”) and were not able to solve it, sorry.

Maybe it would help to-reinstall Anaconda2 now that you have Visual C++ installed.

@ABraun Thank you all the same. I’ve tried several times to reinstall the Anaconda2 and Sen2cor, but it doesn’t work. And the Sen2cor tool wasn’t loaded in the SNAP. I’ll try to find some new hints.

do you have the chance to test it on a different machine to see if it is the setting?

@ABraun I’ve tried it last night in another laptop, and I met the same errors. I searched on the internet and found the same problem,but the solution didn’t work. Just now I saw a reason in another topic that maybe I installed the very updated version.I’ll try to install sen2cor 2.3.0 version again. Thanks a lot.

Dear ABraun, I searched the internet and found someone met the same problem when installing gdal. Then I installed it as a net friend adviced.The web page link is
Then I downloaded a new GDAL installation package from the website The version is GDAL-2.1.3-cp27-cp27m-win_amd64.whl.I entered **'pip install GDAL-2.1.3-cp27-cp27m-win_amd64.whl '**in the command line. It successfully installed without errors. But The GDAL installation package where I downloaded from python prompted errors.

Aithough I solved the GDAL installation error, there’s a new error as follows.

A little upset.

“too few arguments” means that the script can be executed as it should. You however have to name an input folder where your S2 data is located.