【问题标题】:Issue with Pandas: ImportError libstdc++.so.6 inside a Conda environment running PyCharm IDEIssue with Pandas: ImportError libstdc++.so.6 inside a Conda environment running PyCharm IDE
【发布时间】:2022-12-19 09:49:17
【问题描述】:

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.

【问题讨论】:

    标签: python pandas pycharm


    【解决方案1】:

    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
    

    【讨论】:

    • Thank you. I did this whilst inside my conda environment (which uses python 3.10 - the version not working with Pandas) and this fixed it.
    猜你喜欢
    • 1970-01-01
    • 2020-02-13
    • 2019-05-11
    • 2022-10-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-11-16
    • 1970-01-01
    相关资源
    最近更新 更多