首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >非常简单的pip python-twitter问题;不能导入twitter

非常简单的pip python-twitter问题;不能导入twitter
EN

Stack Overflow用户
提问于 2012-10-15 04:17:12
回答 1查看 6.7K关注 0票数 4

我不知道我做错了什么:

代码语言:javascript
复制
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
>>> 

我需要做一个虚拟人吗?还会发生什么?很抱歉我缺乏理解,但是任何帮助都是非常感谢的。

编辑#1试着让tweepy工作但是..。这里可能有两个版本的Python2.7

代码语言:javascript
复制
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
>>> 

我想我可能安装了两个版本的Python2.7;一个是通过自制版本和Apple默认版本安装的。自制安装是否有可能将包放在/Library/Python/2.7/site-packages中?

再一次,提前

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-10-15 04:32:04

来自我所读到的,python:

依赖于Basic,Twitter在2010年8月至9月的某个时候关闭了它。API只支持OAuth,python不支持这一点。

更新:我刚刚尝试使用与您使用的完全相同的方法安装python,而且我也无法导入它。在做了一些研究之后,我偶然发现了Python Twitter工具,我认为它是python的替代品。

twitter需要setuptools。它只是easy_install twitter从网络上安装它。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12889226

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档