Sen2or install error

I have tried many times ,and still receiving the above error. Any help on how to resolve the above error

1 Like

I have had the same problemā€¦

Any helps?

same problem using ubuntu 14 lts

Download the numpy manualy may work!

I am also having this problem, even after a complete uninstall and reinstall of Anaconda and STEP immediately prior to the sen2cor installation. For what its worth I noticed that during the installation, sen2cor downgraded numpy from 1.10.4-py27_0 to 1.9.3-py27_1. Please help!

I am also having this problem, even after a complete uninstall and
reinstall of Anaconda and SNAP immediately prior to the sen2cor
installation. For what its worth I noticed that during the
installation, sen2cor downgraded numpy from 1.10.4-py27_0 to
1.9.3-py27_1. Please help!

Found a solution at least for ubuntu. See here.

I am having the same problem as you on windows7: how did you solve it? I dowloaded numpy, but Iā€™m not a Python user: what do I have to with it?
Cheers
Raffaele

Somehow I ran into different problems using different installation approaches (clean install of sen2cor 2.0.4-2.0.6, as well as updating from 2.0.4) at one point I had the exact same error message as described above

numpy.dtype has the wrong size

With a little help of Google I realized it was caused by an outdated tables installation in combination with a newer numpy version. The solution that worked for me was simple

pip install --upgrade numpy
pip install --upgrade tables

That did the trick. I canā€™t guarantee that it will work for you (Iā€™m using Ubuntu)

The following changes got me part of the way to a working setup. It would have been nice if this anaconda stuff was not mandatory. A list of required versions and compilers (VC9 for compatibility with binary components on windows im guessing) would suffice (and cause less headaches).

setup.py of sen2cor
os.system(ā€˜conda install --no-update-dependencies --yes --channel https://conda.binstar.org/s2tbx proj4ā€™)
os.system(ā€˜conda install --no-update-dependencies --yes --channel https://conda.binstar.org/s2tbx contextlib2ā€™)
os.system(ā€˜conda install --no-update-dependencies --yes --channel https://conda.binstar.org/s2tbx glymurā€™)
os.system(ā€˜conda update --no-update-dependencies --yes --channel https://conda.binstar.org/s2tbx pytablesā€™)

2 Likes

Wow, that did the trick. I was wondering all the time how to prevent the sen2cor installation from updating packages.

So the final solution is to modify the setup.py, as described by @agrapentin. If anyone also gets the missing libcom_err.so.3 message the solution is simple, as krb5 is missing. Just install it using:

conda install krb5

2 Likes

The reason for this dependency problems had been located in the past. Initially there was the need to support a dedicated version of gdal and glymur, which again had the dependencies on the older table version. Anaconda itself had been upgraded during that time, so that now the dependecies do not longer fit. We are currently reviewing the dependecies. There is also a newer version of glymur which is directly supported via conda.

here is the history which explains what happened, and why these dependencies on numpy 19 had been present:

When the last build of Sen2cor had been performed in autumn of last year, the following issue was present:
the necessary gdal tools intrinsically installed by anaconda had been incomplete, so that no DEM could be created.

I thus derived the gdal installation package from:
https://anaconda.org/osgeo/gdal/files istead in order to get the gdal tools running,

which however had the dependency of numpy version 19. This is the reason why the downgrade was performed in the installation script,
as it needed the correct gdal tools. see also:

During the upgrade of Anaconda which occurred in the meantime, this dependency to numpy 19 now leads to the errors you observed.
In the meantime, Anaconda had also included a proper version of gdal 2.0 including all needed programs like gdalwarp and gdaldem,
so that these dependencies are no longer needed. This is also the reason why you have been successful in removing the dependencies.

The new installer will fix these issues.

1 Like

Hi. Iā€™m trying to install sen2cor on Windows 10 and even though I edited the setup.py according to agrapentinā€™s suggestion I am still getting the numpy.dtype error above.

Any idea when the new installer will be ready?

Thanks.

Can you paste the output of conda list?

THanks for response Agrapentin. Here is output:

PS C:\Users\jhanafin> conda list

packages in environment at C:\Users\jhanafin\AppData\Local\Continuum\Anaconda2:

alabaster 0.7.7 py27_0
anaconda 4.0.0 np110py27_0
anaconda-client 1.4.0 py27_0
anaconda-navigator 1.1.0 py27_0
argcomplete 1.0.0 py27_1
astropy 1.1.2 np110py27_0
babel 2.2.0 py27_0
backports-abc 0.4
backports.ssl-match-hostname 3.4.0.2
backports_abc 0.4 py27_0
beautifulsoup4 4.4.1 py27_0
bitarray 0.8.1 py27_1
blaze 0.9.1 py27_0
bokeh 0.11.1 py27_0
boto 2.39.0 py27_0
bottleneck 1.0.0 np110py27_0
bzip2 1.0.6 vc9_2 [vc9]
cdecimal 2.3 py27_1
cffi 1.5.2 py27_0
chest 0.2.3 py27_0
cloudpickle 0.1.1 py27_0
clyent 1.2.1 py27_0
colorama 0.3.7 py27_0
comtypes 1.1.2 py27_0
conda 4.0.5 py27_0
conda-build 1.20.0 py27_0
conda-env 2.4.5 py27_0
conda-manager 0.3.1 py27_0
configobj 5.0.6 py27_0
console_shortcut 0.1.1 py27_1
cryptography 1.3 py27_0
curl 7.45.0 vc9_1 [vc9]
cycler 0.10.0 py27_0
cython 0.23.4 py27_0
cytoolz 0.7.5 py27_0
dask 0.8.1 py27_0
datashape 0.5.1 py27_0
decorator 4.0.9 py27_0
dill 0.2.4 py27_0
docutils 0.12 py27_1
enum34 1.1.2 py27_0
et-xmlfile 1.0.1
et_xmlfile 1.0.1 py27_0
fastcache 1.0.2 py27_0
flask 0.10.1 py27_1
flask-cors 2.1.2 py27_0
freetype 2.5.5 vc9_0 [vc9]
funcsigs 0.4 py27_0
futures 3.0.3 py27_0
gevent 1.1.0 py27_0
greenlet 0.4.9 py27_0
grin 1.2.1 py27_2
h5py 2.5.0 np110py27_4
hdf5 1.8.15.1 vc9_4 [vc9]
heapdict 1.0.0 py27_0
idna 2.0 py27_0
ipaddress 1.0.14 py27_0
ipykernel 4.3.1 py27_0
ipython 4.1.2 py27_1
ipython-genutils 0.1.0
ipython_genutils 0.1.0 py27_0
ipywidgets 4.1.1 py27_0
itsdangerous 0.24 py27_0
jdcal 1.2 py27_0
jedi 0.9.0 py27_0
jinja2 2.8 py27_0
jpeg 8d vc9_0 [vc9]
jsonschema 2.4.0 py27_0
jupyter 1.0.0 py27_2
jupyter-client 4.2.2
jupyter-console 4.1.1
jupyter-core 4.1.0
jupyter_client 4.2.2 py27_0
jupyter_console 4.1.1 py27_0
jupyter_core 4.1.0 py27_0
libpng 1.6.17 vc9_1 [vc9]
libsodium 1.0.3 0
libtiff 4.0.6 vc9_1 [vc9]
llvmlite 0.9.0 py27_0
locket 0.2.0 py27_0
lxml 3.6.0 py27_0
markupsafe 0.23 py27_1
matplotlib 1.5.1 np110py27_0
menuinst 1.3.2 py27_0
mistune 0.7.2 py27_0
mkl 11.3.1 0
mkl-service 1.1.2 py27_0
mpmath 0.19 py27_0
multipledispatch 0.4.8 py27_0
nbconvert 4.1.0 py27_0
nbformat 4.0.1 py27_0
networkx 1.11 py27_0
nltk 3.2 py27_0
nose 1.3.7 py27_0
notebook 4.1.0 py27_2
numba 0.24.0 np110py27_0
numexpr 2.5 np110py27_0
numpy 1.10.4 py27_0
odo 0.4.2 py27_0
openpyxl 2.3.2 py27_0
openssl 1.0.2g vc9_0 [vc9]
pandas 0.18.0 np110py27_0
partd 0.3.2 py27_1
path.py 8.1.2 py27_1
patsy 0.4.0 np110py27_0
pep8 1.7.0 py27_0
pickleshare 0.5 py27_0
pillow 3.1.1 py27_0
pip 8.1.1 py27_1
ply 3.8 py27_0
psutil 4.1.0 py27_0
py 1.4.31 py27_0
pyasn1 0.1.9 py27_0
pycosat 0.6.1 py27_0
pycparser 2.14 py27_0
pycrypto 2.6.1 py27_3
pyflakes 1.1.0 py27_0
pygments 2.1.1 py27_0
pyopenssl 0.15.1 py27_2
pyparsing 2.0.3 py27_0
pyqt 4.11.4 py27_5
pyreadline 2.1 py27_0
pytables 3.2.2 np110py27_2
pytest 2.8.5 py27_0
python 2.7.11 4
python-dateutil 2.5.1 py27_0
pytz 2016.2 py27_0
pywin32 220 py27_1
pyyaml 3.11 py27_3
pyzmq 15.2.0 py27_0
qt 4.8.7 vc9_7 [vc9]
qtawesome 0.3.2 py27_0
qtconsole 4.2.0 py27_1
qtpy 1.0 py27_0
requests 2.9.1 py27_0
rope 0.9.4 py27_1
scikit-image 0.12.3 np110py27_0
scikit-learn 0.17.1 np110py27_0
scipy 0.17.0 np110py27_0
setuptools 20.3 py27_0
simplegeneric 0.8.1 py27_0
singledispatch 3.4.0.3 py27_0
sip 4.16.9 py27_2
six 1.10.0 py27_0
snowballstemmer 1.2.1 py27_0
sockjs-tornado 1.0.1 py27_0
sphinx 1.3.5 py27_0
sphinx-rtd-theme 0.1.9
sphinx_rtd_theme 0.1.9 py27_0
spyder 2.3.8 py27_1
sqlalchemy 1.0.12 py27_0
ssl_match_hostname 3.4.0.2 py27_0
statsmodels 0.6.1 np110py27_0
sympy 1.0 py27_0
tables 3.2.2
tk 8.5.18 vc9_0 [vc9]
toolz 0.7.4 py27_0
tornado 4.3 py27_0
traitlets 4.2.1 py27_0
unicodecsv 0.14.1 py27_0
vs2008_runtime 9.00.30729.1 0
vs2010_runtime 10.00.40219.1 0
werkzeug 0.11.4 py27_0
wheel 0.29.0 py27_0
xlrd 0.9.4 py27_0
xlsxwriter 0.8.4 py27_0
xlwings 0.7.0 py27_0
xlwt 1.0.0 py27_0
zlib 1.2.8 vc9_2 [vc9]
PS C:\Users\jhanafin>

Hi Agrapentin and Jenny,

I am aslo finding the same error on windows 7 enterprise.

Have you found a way to solve the problem?

Thanks a lot.

Hi, for some reason I did not get notified of the responses here. I canā€™t go through the list now, sorry. But this is the conda list -e output I get from my working installation on Windows 10 x64.

D:\>conda list -e
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: win-64
bzip2=1.0.6=vc9_2
conda=4.0.5=py27_0
conda-env=2.4.5=py27_0
contextlib2=0.4.0=py27_0
curl=7.45.0=vc9_1
funcsigs=0.4=py27_0
gdal=1.11.1=np19py27_0
geos=3.4.2=vc9_0
glymur=0.8.0=py27_0
hdf4=4.2.11=0
hdf5=1.8.15.1=vc9_4
jpeg=8d=vc9_0
kealib=1.4.5=vc9_0
libgdal=2.0.0=vc9_2
libnetcdf=4.3.3.1=vc9_5
libpng=1.6.17=vc9_1
libtiff=4.0.6=vc9_1
lxml=3.6.0=py27_0
matplotlib=1.4.3=np19py27_3
menuinst=1.3.2=py27_0
mkl=11.3.1=0
mock=1.3.0=py27_0
msvc_runtime=1.0.1=vc9_0
numexpr=2.4.4=np19py27_0
numpy=1.9.3=py27_1
openssl=1.0.2g=vc9_0
pbr=1.3.0=py27_0
pil=1.1.7=py27_0
pip=8.1.1=py27_0
proj4=4.9.1=vc9_0
psutil=4.1.0=py27_0
pycosat=0.6.1=py27_0
pycrypto=2.6.1=py27_3
pyparsing=2.0.3=py27_0
pyqt=4.11.4=py27_5
pytables=3.2.2=np19py27_0
python=2.7.11=4
python-dateutil=2.5.1=py27_0
pytz=2016.2=py27_0
pyyaml=3.11=py27_3
qt=4.8.7=vc9_7
requests=2.9.1=py27_0
scipy=0.16.0=np19py27_0
setuptools=20.3=py27_0
sip=4.16.9=py27_2
six=1.10.0=py27_0
tk=8.5.18=vc9_0
vs2008_runtime=9.00.30729.1=0
wheel=0.29.0=py27_0
xerces-c=3.1.2=vc9_0
zlib=1.2.8=vc9_2

if you are on windows using x64 conda you could try to save the output above as a text file, remove the packages mentioned below, then do

conda install -f --file SAVED_REQUIREMENTS.txt

then install the packages from the other sources

conda install --no-update-dependencies --yes --channel https://conda.binstar.org/s2tbx proj4
conda install --no-update-dependencies --yes --channel https://conda.binstar.org/s2tbx contextlib2
conda install --no-update-dependencies --yes --channel https://conda.binstar.org/s2tbx glymur
conda update --no-update-dependencies --yes --channel https://conda.binstar.org/s2tbx pytables

I do not try to use this install of python for anything else, doing so would probably screw it up.
Good luck

Hi agrapentin,

thanks a lot for the help, it did work.

In windows 10 is also working by following the same steps that JanMil indicates.

1 Like

Hello all, Iā€™m having the same problem. And I tried adding the ā€˜ā€“no-update-dependenciesā€™ parts to setup.py, no luck. Iā€™m using the latest version of Anaconda (as of today Anaconda2-4.0.0) on Windows 7.

Also, when I try ā€œconda list -eā€, it shows me numpy=1.9.3=py27_1 (which I noticed during installation was downgraded from numpy 1.10.4). pytables is listed as pytables=3.2.2=np110py27_2 (I assume that means it relies on numpy 1.10.x). Any ideas what Iā€™m doing wrong?