Home > Software design >  Issue with Pandas: ImportError libstdc .so.6 inside a Conda environment running PyCharm IDE
Issue with Pandas: ImportError libstdc .so.6 inside a Conda environment running PyCharm IDE

Time:09-27

I am using PyCharm IDE from within a Conda environment and I am writing some python 3.10 code that uses the Pandas. This is on a brand new Linux Ubuntu 20.04 build (about a couple of days old) and I'm running into library issues:

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 /home/anthony/anaconda3/envs/CPRD-software/lib/python3.10/site-packages/pandas/_libs/window/aggregations.cpython-310-x86_64-linux-gnu.so)

I've tried updating LD_LIBRARY_PATH to include the libstdc .so.6 location but that didn't work.

I've looked inside the ./lib directory of my environment (~/anaconda3/env/CPRD-software/lib) and I can see:

libstdc  .so.6 -> /usr/lib/x86_64-linux-gnu/libstdc  .so.6

Also, when I've tried numerous ways of installing Pandas (pip, conda and within PyCharm IDE) it always installs version 1.4.4, and never 1.5.0 including when I've tried conda install pandas=1.5.0.

I'm not sure where to start and I am loath to "hack" around too much without having a firmer grasp on a possible solution. Thanks.

CodePudding user response:

Try running these following commands

sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update
sudo apt-get upgrade libstdc  6 -y
  • Related