【发布时间】:2012-10-15 04:17:12
【问题描述】:
我不知道我在这里做错了什么:
Sun Oct 14$ pip install python-twitter
Requirement already satisfied (use --upgrade to upgrade): python-twitter in /Library/Python/2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): setuptools in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from python-twitter)
Requirement already satisfied (use --upgrade to upgrade): simplejson in /Library/Python/2.7/site-packages (from python-twitter)
Requirement already satisfied (use --upgrade to upgrade): oauth2 in /Library/Python/2.7/site-packages (from python-twitter)
Requirement already satisfied (use --upgrade to upgrade): httplib2 in /Library/Python/2.7/site-packages (from oauth2->python-twitter)
Cleaning up...
Sun Oct 14$ python
Python 2.7.2 (default, Nov 17 2011, 13:22:48)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import twitter
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named twitter
>>>
我需要做一个 virtualenv 吗?还有什么可能发生的?很抱歉我缺乏理解,但感谢您提供任何帮助。
编辑 #1 试图让 tweepy 工作,但是.... 可能这里有两个版本的 Python 2.7
Sun Oct 14$ pip install --upgrade tweepy
Requirement already up-to-date: tweepy in ./tweepy-1.11-py2.7.egg
Cleaning up...
Sun Oct 14$ python
Python 2.7.2 (default, Nov 17 2011, 13:22:48)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tweepy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named tweepy
>>>
我想我可能安装了两个版本的 Python 2.7;一个通过自制软件和苹果默认设置。自制软件安装是否有可能将包放在 /Library/Python/2.7/site-packages 中?
再次感谢您
【问题讨论】:
-
你可能安装了两个版本的 Python 2.7 吗?
-
很喜欢 tweepy 但我认为你也可能是对的
-
在 virtualenv 中尝试;如果它有效,你有你的答案。
标签: python pip python-twitter