4

I am trying to use pymcef as shown in this link: http://nbviewer.jupyter.org/github/hzzyyy/pymcef/blob/master/Quickstart%20tutorial.ipynb

It says

This package is only available on 64 bits OS, in addition, C++11 runtime library is alse required.

I install the package using

conda install -c hzzyyy pymcef

When running with:

from pymcef import SimpleEF, RiskMeasure

I got the error:

/lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/myaccount_name/anaconda2/lib/python2.7/site-packages/pymcef/_ppslp.so)

Since I am not the root user on a remote machine, is it possible for me to make this work in some way? (best possibly with some kind of conda install)

milbrandt
  • 1,438
  • 2
  • 15
  • 20
user40780
  • 1,828
  • 7
  • 29
  • 50

3 Answers3

4

You could try to install glibc 2.14 in a specific path and force it with an env variable:

export LD_LIBRARY_PATH=/home/user/.usr/lib

Check this answer about how to do it:

How to upgrade glibc from version 2.12 to 2.14 on CentOS?

what is your distrib, and which version?

Syl
  • 2,733
  • 2
  • 17
  • 20
  • how do i check which distrib, and version? Thanks – user40780 Feb 06 '18 at 20:49
  • Linux version 2.6.32-573.el6.x86_64 (gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) ) – user40780 Feb 06 '18 at 20:55
  • ok, based on the error from the package you want to use, you may also need to install a custom gcc, since c++ 11 is only available from gcc 4.8. You can still try to enable it with some flags: https://gcc.gnu.org/gcc-4.4/cxx0x_status.html or upgrade http://blog.ycshao.com/2017/10/01/how-to-install-custom-gcc-version-on-centos-rhel/ – Syl Feb 07 '18 at 07:15
  • another solution could be to run everything in a docker container, this way you'll have complete freedom of what you put in it. – Syl Feb 07 '18 at 07:17
  • It looks like the docker container looks much better. Does it work with linux, since I work mostly with python, is it compatible well with conda? – user40780 Feb 07 '18 at 15:23
  • docker works perfectly on linux, but it's another software to install, so you'll need to check if you can do it on your distrib. You may also find preconfigured docker image with what you need, so you can check that out. – Syl Feb 08 '18 at 10:33
1

When python loads a module that includes a shared object, it needs to also load any shared objects it depends on. You can examine these requirements for yourself using

ldd ~/anaconda2/lib/python2.7/site-packages/pymcef/_ppslp.so

Any "not found" dependencies will need to be resolved before you can use the package. The simplest way to do this is to put the dependent libraries in the same directory.

So assuming you have glibc 2.14 somewhere, you can place it (and any other libraries it depends on) in the pymcef directory above.

Note that by default your packages should have been installed in ~/.local/lib/python2.7, so it's likely that the installation process creates some .pth files mapping to this location. Regardless, if python is finding _ppslp.so where it is installed, then adding glibc to the same directory should work.

jwm
  • 1,504
  • 1
  • 14
  • 29
0

I faced the same error , so I tracked the following file : libgcc_s.so.1, and found its a symlink to another glibc file : libgcc_s-4.8.2-20140120.so.1 , so I checked another RHEL server that is in a different RHEL level (lower basically) copied that file and replaced the symlink and it worked.

/HALATA

jottbe
  • 4,228
  • 1
  • 15
  • 31
HALATA
  • 1