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

问题描述 投票:0回答:2

我正在尝试安装praw,以允许我制作Reddit机器人。我已经在Windows机器上实现了这一目标,并成功制作了一个简单的bot,但是在尝试在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'

我的Python 3版本应该没问题:

$ python3 --version
Python 3.4.3

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

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

python praw
2个回答
1
投票

用途:python3 -m pip install praw


0
投票

欢迎使用StackOverFlow尝试一下:

pip3 install praw

有关更多信息,您可以转到:https://praw.readthedocs.io/en/latest/getting_started/installation.html

© www.soinside.com 2019 - 2024. All rights reserved.