[英]How to install praw using python 3.x instead of python 2.7.9
我正在嘗試安裝 praw 以允許我制作 Reddit 機器人。 我在 Windows 機器上實現了這一點,並成功制作了一個簡單的機器人,但在我的 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 作為某種默認值 - 我不確定如何覆蓋。
使用:python3 -m pip install praw
歡迎使用 StackOverFlow 試試這個:
pip3 install praw
有關更多信息,您可以 go 至: https://praw.readthedocs.io/en/latest/getting_started/installation.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.