简体   繁体   中英

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. 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.

When I enter pip install praw in Terminal it says:

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:

$ 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.

On Windows I was able to simply install Python 3, and then install praw with minimal hassle; but MacOS seems to use Python 2.7 as some kind of default - which I'm not sure how to override.

Use: python3 -m pip install praw

Welcome to StackOverFlow Try this:

pip3 install praw

For more information you can go to: https://praw.readthedocs.io/en/latest/getting_started/installation.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM