我已经在带有 Twitter 包的 Windows 7 机器上安装了 Python 3.3……但它抛出了一个语法错误:
C:\Python33\dist\python-oauth2-master>python setup.py build
File "setup.py", line 18
print "unable to find version in %s" % (VERSIONFILE,)
^
SyntaxError: invalid syntax
上述错误现已解决...感谢您的帮助!!!
我尝试使用 Python 2.7,但现在出现此错误...
>>> import twitter
>>> twitter_search = twitter.Twitter(domain="search.twitter.com")
>>> trends = twitter_search.trends()
File "C:\Python27\lib\urllib2.py", line 1184, in do_open
raise URLError(err)
URLError: <urlopen error
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond>
我很感激这方面的任何帮助。