【发布时间】:2020-04-06 04:31:18
【问题描述】:
当我尝试使用 pip install twilio 时,我收到以下消息:
"DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. 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"
我一直在兜圈子,尝试了所有方法,有什么建议吗? 当我在终端中输入 python --version 时,我得到 Python 3.8.2
【问题讨论】:
-
永远不要直接使用
pip脚本(或pip3或类似的东西)。相反,总是更喜欢通过为特定的 Python 解释器调用 pip 的 executable module 的更可靠的明确方式:path/to/pythonX.Y -m pip somecommand-- snarky.ca/why-you-should-use-python-m-pip