How to solve import error for pandas?

后端 未结 11 1755
忘掉有多难
忘掉有多难 2020-11-29 08:03

I installed Anaconda with python 2.7.7.
However, whenever I run \"import pandas\" I get the error:
\"ImportError: C extension: y not built. If you want to impo

11条回答
  •  孤城傲影
    2020-11-29 08:49

    I was having this problem with python 2.7.13 here is my solution: 1. install Cython with

    pip install Cython
    

    2. install g++ and gcc

    apt-get install gcc, g++
    

    3. uninstall pandas

    pip uninstall pandas
    

    4. reinstall pandas

    pip install pandas
    

    then everything will be OK.

提交回复
热议问题