[英]How to install praw using python 3.x instead of python 2.7.9
I'm trying to install praw to allow me to make a Reddit bot.我正在尝试安装 praw 以允许我制作 Reddit 机器人。 I have achieved this on a Windows machine and successfully made a simple bot, but am encountering a persistent error trying to install praw on my mac.
我在 Windows 机器上实现了这一点,并成功制作了一个简单的机器人,但在我的 mac 上安装 praw 时遇到了持续错误。
When I enter pip install praw
in Terminal it says:当我在终端中输入
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'
My version of Python 3 should be fine:我的 Python 3 版本应该没问题:
$ python3 --version
Python 3.4.3
But I can't seem to make it install using Python 3, it only wants to install using Python 2.但我似乎无法使用 Python 3 安装它,它只想使用 Python 2 安装。
On Windows I was able to simply install Python 3, and then install praw with minimal hassle;在 Windows 上,我可以简单地安装 Python 3,然后轻松安装 praw; but MacOS seems to use Python 2.7 as some kind of default - which I'm not sure how to override.
但 MacOS 似乎使用 Python 2.7 作为某种默认值 - 我不确定如何覆盖。
Use: python3 -m pip install praw使用:python3 -m pip install praw
Welcome to StackOverFlow Try this:欢迎使用 StackOverFlow 试试这个:
pip3 install praw
For more information you can go to: https://praw.readthedocs.io/en/latest/getting_started/installation.html有关更多信息,您可以 go 至: https://praw.readthedocs.io/en/latest/getting_started/installation.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.