我无法在我的fabric脚本上运行gspread,尽管我已经通过pip安装了gspread。我错过了什么?
Gangzhengs-MacBook-Pro:Fabric mosesliao$ pip install gspread
Collecting gspread
Requirement already satisfied (use --upgrade to upgrade): requests>=2.2.1 in /usr/local/lib/python2.7/site-packages (from gspread)
Installing collected packages: gspread
Successfully installed gspread-0.3.0
Gangzhengs-MacBook-Pro:Fabric mosesliao$ fab google_docs
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/fabric/main.py", line 658, in main
docstring, callables, default = load_fabfile(fabfile)
File "/Library/Python/2.7/site-packages/fabric/main.py", line 165, in load_fabfile
imported = importer(os.path.splitext(fabfile)[0])
File "/Users/mosesliao/svn/chubi-trunk-project/Fabric/fabfile.py", line 29, in <module>
import gspread
ImportError: No module named gspread
Gangzhengs-MacBook-Pro:Fabric mosesliao$ pip install gspread
Requirement already satisfied (use --upgrade to upgrade): gspread in /usr/local/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): requests>=2.2.1 in /usr/local/lib/python2.7/site-packages (from gspread)
Gangzhengs-MacBook-Pro:Fabric mosesliao$ python -V
Python 2.7.11发布于 2016-02-23 12:09:37
File "/Library/Python/2.7/site-packages/fabric/main.py", line 165, in load_fabfile和
Requirement already satisfied (use --upgrade to upgrade): gspread in /usr/local/lib/python2.7/site-packages似乎表明您的计算机上安装了两个python2.7。一个是“类Mac”,另一个是“类Linux”。也许你使用的是Mac默认安装中的python和另一个默认安装中的pip。至少值得一试。
which pip
which pythonhttps://stackoverflow.com/questions/35568324
复制相似问题