ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found

12.7k Views Asked by At

I am getting the error:

(genslm) smrutip@dgx1:~/smruti_project/pyro-cov$ make analyze 
python scripts/mutrans.py --vary-holdout Traceback (most recent call last): File "/raid/home/smrutip/smruti_project/pyro-cov/scripts/mutrans.py", line 16, in from pyrocov import mutrans, pangolin, sarscov2 File "/raid/home/smrutip/smruti_project/pyro-cov/pyrocov/mutrans.py", line 37, in import pyrocov.geo File "/raid/home/smrutip/smruti_project/pyro-cov/pyrocov/geo.py", line 12, in import pandas as pd File "/raid/home/smrutip/anaconda3/envs/genslm/lib/python3.9/site-packages/pandas/init.py", line 48, in from pandas.core.api import ( File "/raid/home/smrutip/anaconda3/envs/genslm/lib/python3.9/site-packages/pandas/core/api.py", line 47, in from pandas.core.groupby import ( File "/raid/home/smrutip/anaconda3/envs/genslm/lib/python3.9/site-packages/pandas/core/groupby/init.py", line 1, in from pandas.core.groupby.generic import ( File "/raid/home/smrutip/anaconda3/envs/genslm/lib/python3.9/site-packages/pandas/core/groupby/generic.py", line 77, in from pandas.core.frame import DataFrame File "/raid/home/smrutip/anaconda3/envs/genslm/lib/python3.9/site-packages/pandas/core/frame.py", line 182, in from pandas.core.generic import NDFrame File "/raid/home/smrutip/anaconda3/envs/genslm/lib/python3.9/site-packages/pandas/core/generic.py", line 179, in from pandas.core.window import ( File "/raid/home/smrutip/anaconda3/envs/genslm/lib/python3.9/site-packages/pandas/core/window/init.py", line 1, in from pandas.core.window.ewm import ( File "/raid/home/smrutip/anaconda3/envs/genslm/lib/python3.9/site-packages/pandas/core/window/ewm.py", line 11, in import pandas._libs.window.aggregations as window_aggregations 
ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /raid/home/smrutip/anaconda3/envs/genslm/lib/python3.9/site-packages/pandas/_libs/window/aggregations.cpython-39-x86_64-linux-gnu.so) make: *** [Makefile:63: analyze] Error 1

but couldnt solve it using any of the solutions. I am not supposed to use sudo command due to permission issues. Can anyone tell me how to solve it using conda?

I am expecting this "make analyze" should work and give results

3

There are 3 best solutions below

2
khushi-411 On

In my case, this error occurred due to different gcc and g++ versions. Please check your versions via the following:

gcc --version
g++ --version

Updating and having the same gcc and g++ versions solved this issue. To install those in your conda environment, use the following command: To install gcc:

conda install -c conda-forge gcc

To install g++:

conda install -c conda-forge gxx

I hope this helps you. Thanks!

0
Maciek Woźniak On

simple and almsot silly solution. I got this error when importing pandas. Simply uninstall and reinstall pandas solved the issue. The solution posted above didn't fix that for me

0
ashish mishra On

This happened to me when I installed pandas using conda. Here is what worked for me.

Uninstall pandas via conda

conda uninstall pandas

Install pandas using pip

pip install pandas