如何使用 python 3.x 而不是 python 安装 praw 2.7.9

How to install praw using python 3.x instead of python 2.7.9

我正在尝试安装 praw 以允许我制作 Reddit 机器人。我已经在 Windows machine 上实现了这一点,并成功制作了一个简单的机器人,但是我在尝试在我的 mac.

上安装 praw 时遇到了一个持续的错误

当我在终端中输入 pip install praw 时,它显示:

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting praw
  Using cached https://files.pythonhosted.org/packages/f6/df/b42c0a3b86a43a62a46e5b2f07930230ac7719624800a2052218993fb767/praw-6.4.0-py2.py3-none-any.whl
ERROR: Package 'praw' requires a different Python: 2.7.9 not in '>=3.4'

我的Python3版本应该没问题:

$ python3 --version
Python 3.4.3

但我似乎无法使用 Python 3 安装它,它只想使用 Python 2.

安装

在 Windows 上,我能够简单地安装 Python 3,然后安装 praw 的麻烦最小;但 MacOS 似乎使用 Python 2.7 作为某种默认值 - 我不确定如何覆盖。

使用: python3 -m pip install praw

欢迎使用 Whosebug 试试这个:

pip3 install praw

更多信息您可以访问:https://praw.readthedocs.io/en/latest/getting_started/installation.html