为什么brew安装的python没有看到pip安装的模块?

时间:2017-11-01 13:35:13

标签: python pip homebrew

pandaspandasql都是通过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) / pippip2 brew版本不同意?如何解决这个问题?

注意:我还尝试使用pythonbrew来确定:它会给出相同的结果。

pip

1 个答案:

答案 0 :(得分:1)

假设brew至少正确安装了Python,确保使用pip模块的解决方法就是明确地使用它

python -m pip install 

如果您愿意,可以将pip-inst别名重定向到该名称,这样就可以减少打字