arcsi installation ubuntu 14 and 18

111 views
Skip to first unread message

Roberta Fagandini

unread,
Jan 21, 2019, 6:40:51 AM1/21/19
to RSGISLib Support

Hi all,
I'm trying to install arcsi using miniconda 3 on both Ubuntu 14 and 18. I follow the instructions for the installation of arcsi on Linux and everything seems to work fine, but when I try to run arcsi.py --version I got this error:
ImportError: /home/roberto/miniconda3/envs/cloud/lib/python3.6/site-packages/osgeo/../../../libgdal.so.20: undefined symbol: _ZN6libdap3DDSC1EPNS_15BaseTypeFactoryERKSs

It seems to be related to the gdal version (2.2.4) but I don't know how to fix it.
Any idea?

Thanks in advance!

Roberta

Nathan Thomas

unread,
Jan 21, 2019, 6:52:24 AM1/21/19
to Roberta Fagandini, RSGISLib Support
Hi Roberta,

Have you tried:

conda update --all

This often fixes my miniconda/version issues.




--
You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.
To post to this group, send email to rsgislib...@googlegroups.com.
Visit this group at https://groups.google.com/group/rsgislib-support.
For more options, visit https://groups.google.com/d/optout.

Roberta Fagandini

unread,
Jan 21, 2019, 7:13:32 AM1/21/19
to RSGISLib Support
Hi,
thanks for the quick response..I tried both conda update --all and conda update -c conda-forge --all but I still got the error!

Sam Franklin

unread,
Jan 24, 2019, 5:41:11 AM1/24/19
to Roberta Fagandini, RSGISLib Support
Hi Roberta, did you resolve your issue?

If not, I have seen this libgdal.so.20 error before.

As you point out, the libgdal error is not restricted to the arcsi package, e.g. see the identical error reported against the shapley package on conda-forge/gdal-feedstock repo https://github.com/conda-forge/gdal-feedstock/issues/257

Following the suggestion on the github issue to pin specific packages versions, I just installed arcsi in a linux-64 conda env, see below.

Interesting there's a numpy warning, but I don't think that's a show-stopper. To resolve fully, I think it's one for Dan or the other maintainers to update the arcsi/rsgislib recipe on conda-forge (I could be wrong here though!).

Hope the below helps in the short term.

$ conda create --name arcsi_env_2019-01-24-test-02 python=3.5 gdal=2.2.4 libgcc-ng=7.2.0 arcsi openblas

$ python -c "from osgeo import gdal;print(gdal.__version__)"
2.2.4

$ arcsi.py
(arcsi_env_2019-01-24-test-02) $ arcsi.py
/home/sam/miniconda3/envs/arcsi_env_2019-01-24-test-02/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
/home/sam/miniconda3/envs/arcsi_env_2019-01-24-test-02/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
/home/sam/miniconda3/envs/arcsi_env_2019-01-24-test-02/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
/home/sam/miniconda3/envs/arcsi_env_2019-01-24-test-02/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
/home/sam/miniconda3/envs/arcsi_env_2019-01-24-test-02/lib/python3.5/site-packages/sklearn/ensemble/weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release.
  from numpy.core.umath_tests import inner1d
ARCSI 3.1.6 Copyright (C) 2017 Pete Bunting, Dan Clewley
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; See website (http://www.rsgislib.org/arcsi).
Bugs are to be reported to rsgislib...@googlegroups.com.

arcsi.py [options]
help : arcsi.py --help
  or : arcsi.py -h

Example: arcsi.py -s sen2 -p RAD TOA DOS --stats -f KEA -o ./Outputs \
                  -i ./S2A_MSIL1C_20170105T112441_N0204_R037_T30UVD_20170105T112439.SAFE/MTD_MSIL1C.xml

Example: arcsi.py -s wv3 -p RAD DOSAOTSGL SREF METADATA -f KEA --stats -o ./outputs/wv3/ \
                  -t ./tmp -i./054000253010_01_P001_MUL/14SEP03025718-M2AS-054000253010_01_P001.XML \
                  --dem ./SRTM_90m.kea

Example: arcsi.py -s ls5tm -p RAD SATURATE TOPOSHADOW TOA THERMAL CLOUDS CLEARSKY DOSAOTSGL SREF STDSREF FOOTPRINT METADATA \
                  -i ./LT52030232011303KIS00/LT52030232011303KIS00_MTL.txt --outpath ./LS5/Outputs \
                  --stats --format KEA --tmpath ./LS5/tmp --dem ./SRTM_1arc_UK.kea \
                  --outproj4 ./osgb_proj4.prj --projabbv osgb




---
Sam Franklin


On Mon, 21 Jan 2019 at 12:13, Roberta Fagandini <robifa...@gmail.com> wrote:
Hi,
thanks for the quick response..I tried both conda update --all and conda update -c conda-forge --all but I still got the error!

--

Roberta Fagandini

unread,
Jan 24, 2019, 9:37:52 AM1/24/19
to rsgislib...@googlegroups.com
Hi Sam,
thank you for your suggestion!
I have already tested your solution but unfortunately, it doesn't work for me. When I run the command line conda create --name arcsi_env_2019-01-24-test-02 python=3.5 gdal=2.2.4 libgcc-ng=7.2.0 arcsi openblas I get this error:

PackagesNotFoundError: The following packages are not available from current channels:

  - arcsi

Current channels:


Therefore, I tried to run the same command line without arcsi and then to print the gdal version and in this case, it works. But when I install arcsi using the conda-forge channel, the gdal version is updated and I get the error again.

Any idea? What channel did you use to install arcsi?

Thanks!
Roberta

Sam Franklin

unread,
Jan 24, 2019, 1:25:46 PM1/24/19
to Roberta Fagandini, RSGISLib Support
Hi Roberta,

Hmm...I suspect you now now got a case of "mixed" channels for packages, meaning some of the packages come from "default" channel and some from "conda-forge" channel.

I should have mentioned this. Are you using a conda configuration file? I suspect not considering arcsi wasn't found when you ran the create env and install command. The conda config file sits (OSX or linux) in your home directory and you can control channel priority. Further info here https://conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html

My conda config looks like this:

$ cat ~/.condarc
channels:
  - conda-forge
  - defaults
show_channel_urls: true

Also suggest you check out this page https://conda-forge.org/docs/conda-forge_gotchas.html which explains why installing packages from different channels can cause issues. I got my config from the example provided on that page.

Yeah as you say, I reckon you installed those packages from the default channel, then install arcsi from conda-forge and which then modified the previously pinned dependancies.

Suggest you update your conda config and then create a new conda environment as before:

conda create --name arcsi_test python=3.5 gdal=2.2.4 libgcc-ng=7.2.0 arcsi openblas

Also, I've seen people say using the --channel (or -c) option (which in theory means you don't need a config file):

conda create --c conda-forge --name arcsi_test python=3.5 gdal=2.2.4 libgcc-ng=7.2.0 arcsi openblas

However, I think I've had a few issues with the -c option not correctly prioritising the conda-forge channel for all packages. Personally, I would set config file.

Hope that helps.

---
Sam Franklin


Reply all
Reply to author
Forward
0 new messages