2
import pandas as pandas 
import Quandl as Quandl

df = Quandl.get('WIKI/GOOGL')

print (df.head)

当我尝试运行这个程序时,它会产生一个不寻常的错误

    Traceback (most recent call last):
  File "/home/machine/.local/lib/python3.5/site-packages/pandas/__init__.py", line 25, in <module>
    from pandas import hashtable, tslib, lib
ImportError: /home/machine/.local/lib/python3.5/site-packages/pandas/hashtable.cpython-35m-x86_64-linux-gnu.so: undefined symbol: PyFPE_jbuf

在处理上述异常的过程中,又出现了一个异常:

Traceback (most recent call last):
  File "ML_prac.py", line 1, in <module>
    import pandas as pandas 
  File "/home/machine/.local/lib/python3.5/site-packages/pandas/__init__.py", line 31, in <module>
    "extensions first.".format(module))
ImportError: C extension: /home/machine/.local/lib/python3.5/site-packages/pandas/hashtable.cpython-35m-x86_64-linux-gnu.so: undefined symbol: PyFPE_jbuf not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace' to build the C extensions first.

我应该怎么做才能解决这个问题???有什么建议么

4

1 回答 1

0

使用 pip 升级——

[sudo] pip install --upgrade pandas
于 2018-05-30T06:23:56.543 回答