小编use*_*000的帖子

为什么在尝试导入 Pandas Python 模块时会出现 ImportError?

我安装的是熊猫模块为Python 2.7使用apt-get。但是,当我尝试导入模块时,它会引发ImportError

 import pandas as pd
 File "/usr/lib/pymodules/python2.7/pandas/__init__.py", line 15, in <module>
    raise ImportError('ImportError: C extensions not built: if you installed already verify that you are not importing from the source directory')
Run Code Online (Sandbox Code Playgroud)

来电/usr/lib/pymodules/python2.7/pandas/__init__.py是:

import pandas.lib as lib
except Exception:  # pragma: no cover
    import sys
    e = sys.exc_info()[1] # Py25 and Py3 current exception syntax conflict
    if 'No module named' in str(e):
        raise ImportError('C extensions not built: if you installed already ' …
Run Code Online (Sandbox Code Playgroud)

python

6
推荐指数
2
解决办法
5万
查看次数

标签 统计

python ×1