2012-10-15 3 views
3
나도 몰라

를 가져올 수 없습니다 내가 잘못 여기서 뭐하는거야 :정말 간단한 파이썬 파이썬 - 트위터 문제; 트위터

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

가능성이 파이썬 여기에 2.7의 두 가지 버전이있을 수 있습니다 .... 작업 tweepy려고하지만

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 
>>> 

내가 파이썬 2.7의 두 가지 버전이있을 수 있습니다 생각 설치; 하나는 자작과 애플의 불이행이다. homebrew 설치가 /Library/Python/2.7/site-packages에 패키지를 넣을 수 있습니까?

또, 사전에 들으 what I've read,에서

+0

두 가지 버전의 Python 2.7이 설치되어 있습니까? – jdotjdot

+0

tweepy와 (과) 함께 할 수는 있지만 나는 맞을 수도 있다고 생각합니다. – timpone

+0

virtualenv에서 시도해보십시오. 그것이 효과가 있다면, 당신은 당신의 대답을 가지고 있습니다. – jdotjdot

답변

1

파이썬 - 트위터 :

Relies on Basic-Auth which Twitter switched off sometime between August and September (2010). Only OAuth is supported by the API, and python-twitter doesn't support this.

업데이트 : 난 그냥 당신이 사용하는 동일한 방법을 사용하여 파이썬 트위터를 설치 시도하고 나는 그것을 가져올 수 없습니다입니다 게다가. 몇 가지 조사를 한 후 Python Twitter Tools을 발견했습니다. 파이썬 트위터의 대체품이라고 생각합니다.

Installing twitter에는 setuptools가 필요합니다. 웹에서 설치하려면 단지 easy_install twitter입니다.

+0

thx, tweepy 작업을 시도했지만 여전히 비슷한 오류가 발생합니다. 흠 .... 해상도에 대한 아이디어가 있습니까? 파이썬은 분명히 내 강점이 아니야 – timpone

+0

실제로 pip 대신에 setuptools가 필요한'sudo esay_install twitter'를 사용해보십시오. http://mike.verdone.ca/twitter/#install 이것은 나를 위해 일하는 것 같습니다. –

+0

나는 전에 주사위를 굴려 본 적이 없지만,'ImportError : No module named twitter'를 얻었습니다. virtualenv에서 보도록하겠습니다. – timpone