在 Windows 上安装 tweepy 时出错

use*_*511 2 python tweepy

我是 Python 和 tweepy 的新手。我曾尝试寻找答案,但一直无法实现。

我有 Java 6(对于另一个项目,不能更改为 7)、python 2.7,并且我已经在 C 驱动器中下载并解压缩了 tweepy。

Java 和 python 都在 PATH 变量中。我正在尝试安装 tweepy,但不断收到此错误。

C:\>cd C:\tweepy

C:\tweepy>python
Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>setup.py build
  File "<stdin>", line 1
    setup.py build
                 ^
SyntaxError: invalid syntax
>>> setup.py install
  File "<stdin>", line 1
    setup.py install
                   ^
SyntaxError: invalid syntax
>>>
Run Code Online (Sandbox Code Playgroud)

我哪里错了?是配置问题吗?

小智 5

另一种方法是使用 pip(如果你安装了它)。跑

pip install tweepy
Run Code Online (Sandbox Code Playgroud)

它应该工作得很好。