【发布时间】:2018-07-30 20:32:03
【问题描述】:
我刚刚开始使用 pycharm。我想使用 tabula-py,当我尝试导入 tabula 时,它给了我以下错误:
import tabula
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/Applications/PyCharm
CE.app/Contents/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21,
in do_import
module = self._system_import(name, *args, **kwargs)
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
packages/tabula/__init__.py", line 1, in <module>
from .wrapper import read_pdf
File "/Applications/PyCharm
CE.app/Contents/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21,
in do_import
module = self._system_import(name, *args, **kwargs)
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
packages/tabula/wrapper.py", line 17, in <module>
import pandas as pd
File "/Applications/PyCharm
CE.app/Contents/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21,
in do_import
module = self._system_import(name, *args, **kwargs)
ImportError: No module named pandas
当我尝试导入熊猫时,同样的错误。我该如何解决这个问题?
pip 的输出:
已满足要求:/Users/Rexon/Library/Python/2.7/lib/python/site-packages 中的 pandas 已满足要求:/Users/Rexon/Library/Python/2.7/lib 中的 numpy>=1.9.0 /python/site-packages(来自 pandas) 已满足要求:/Users/Rexon/Library/Python/2.7/lib/python/site-packages(来自 pandas)中的 python-dateutil 已满足要求:/中的 pytz>=2011k Users/Rexon/Library/Python/2.7/lib/python/site-packages(来自 pandas) 要求已经满足:/Users/Rexon/Library/Python/2.7/lib/python/site-packages 中的六个>=1.5(来自蟒蛇)
【问题讨论】:
-
你试过
pip install pandas吗? -
是的,它说“要求已经满足:/Users/Rexon/Library/Python/2.7/lib/python/site-packages 中的熊猫要求已经满足:/Users/ 中的 numpy>=1.9.0 Rexon/Library/Python/2.7/lib/python/site-packages(来自 pandas) 要求已经满足:/Users/Rexon/Library/Python/2.7/lib/python/site-packages 中的 python-dateutil(来自 pandas) 要求已经满足:/Users/Rexon/Library/Python/2.7/lib/python/site-packages 中的 pytz>=2011k(来自 pandas) 要求已经满足:/Users/Rexon/Library/Python/2.7/ 中的 6>=1.5 lib/python/site-packages(来自 python