I'm using Anaconda 4.10.3
, with Python 3.9.7
, Scipy 1.7.1
on Ubuntu 16.04.6
. A script I need to run uses Scipy's optimize and it throws the following error:
ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version 'GLIBCXX_3.4.26' not found (required by /home/user/anaconda3/envs/work/lib/python3.9/site-packages/scipy/optimize/_group_columns.cpython-39-x86_64-linux-gnu.so)
As indicated in the error, the system libstcc++.so.6
does not provide GLIBCXX_3.4.26
, which I verified using
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
Then I ran conda install libgcc
and verified that strings /home/user/anaconda3/envs/work/lib/libstdc++.so.6.0.29 | grep GLIBCXX
shows GLIBCXX_3.4.26
. I then added the following line to my .bashrc
and ran source ~/.bashrc
LD_LIBRARY_PATH=/home/user/anaconda3/envs/work/lib/:$LD_LIBRARY_PATH
When I run the script after this, I still get the same error saying ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version 'GLIBCXX_3.4.26' not found
.
I was thinking of downgrading scipy, but shouldn't there be a better way to fix this without downgrading?