pandas
和pandasql
都是通过pip
安装的,并且对python
的系统/ macos版本可见。安装brew
的{{1}}无法看到它们:它们会导致
python
我也尝试了ImportError: No module named pandas
具体的点子:
brew
那么为什么 $/usr/local/Cellar/python/2.7.14/libexec/bin/pip install pandasql
Requirement already satisfied: pandasql in /Library/Python/2.7/site-packages
Requirement already satisfied: numpy in /Users/sboesch/Library/Python/2.7/lib/python/site-packages (from pandasql)
Requirement already satisfied: sqlalchemy in /Library/Python/2.7/site-packages (from pandasql)
Requirement already satisfied: pandas in /Library/Python/2.7/site-packages (from pandasql)
Requirement already satisfied: pytz>=2011k in /Library/Python/2.7/site-packages (from pandas->pandasql)
Requirement already satisfied: python-dateutil in /Users/sboesch/Library/Python/2.7/lib/python/site-packages (from pandas->pandasql)
Requirement already satisfied: six>=1.5 in /Users/sboesch/Library/Python/2.7/lib/python/site-packages (from python-dateutil->pandas->pandasql)
/ pip
和pip2
brew
版本不同意?如何解决这个问题?
注意:我还尝试使用python
版brew
来确定:它会给出相同的结果。
pip
答案 0 :(得分:1)
假设brew至少正确安装了Python,确保使用pip模块的解决方法就是明确地使用它
python -m pip install
如果您愿意,可以将pip-inst
别名重定向到该名称,这样就可以减少打字