readxl icon indicating copy to clipboard operation
readxl copied to clipboard

undefined symbol: libiconv while importing readxl

Open RPUTHUMA opened this issue 2 years ago • 1 comments

I have created a R model using Readxl and haven package and have pickled the model using saveRDS function. Now when i try to load the model using readRDS the package import for readxl and haven packages fail i am using importr and trying to load the readxl package

To Reproduce

Run the below command in python terminal

packages=[] packages.append({"name": "readxl", "version": "1.3.1"}) p_list = [package["name"] for package in packages] import rpy2.robjects.packages as rpackages for package in p_list: rpackages.importr(package, on_conflict="warn")

Expected behavior it should be able to load the package without any issue

Error unable to load shared object '/opt/miniconda/lib/R/library/readxl/libs/readxl.so': /opt/miniconda/lib/R/library/readxl/libs/readxl.so: undefined symbol: libiconv Calls: -> loadNamespace -> library.dynam -> dyn.load

RPUTHUMA avatar Aug 12 '22 08:08 RPUTHUMA

This will need to become a minimal, clean example using readxl, installed from CRAN or this repo, before I can consider evaluating it.

Chances are this is a problem caused by the use of miniconda, which would out of scope here.

jennybc avatar Aug 17 '22 22:08 jennybc