python - 找不到 Pip 命令。路径问题

标签 python pip

我是 python 和终端的新手,所以我提前道歉并感谢您的时间。我安装了 python 以及自制软件。我正在尝试做

$ sudo easy_install pip

收到

Password:
Searching for pip
Reading https://pypi.python.org/simple/pip/
Download error on https://pypi.python.org/simple/pip/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!
Couldn't find index page for 'pip' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!
No local packages or download links found for pip
error: Could not find suitable distribution for Requirement.parse('pip')

我一天中的大部分时间都在寻找解决此问题的答案,但我感觉好像我只是在弄乱我的目录。我正处在这样一个时刻,最好只是删除/卸载任何与 python 相关的东西并正确重新安装。

当我查找路径时,不同目录中有许多不同版本的 python

~$ echo $PATH   /Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin

如有任何关于如何解决此问题/故障排除的建议,我们将不胜感激。或者递归卸载/删除 python 的方法,这样我就可以重新开始,如果这会更容易的话。谢谢你

最佳答案

在 xcode8.3 上,您需要使用 pip2pip3 例如; pip3 安装 flask

关于python - 找不到 Pip 命令。路径问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52470651/

相关文章:

Python 的 super() ,到底发生了什么?

python - 无法导入名称 'WordCloud'

python - 尝试使用 pip 安装 Django 时出错

python pip install "mkl-fft"无法安装

python - 子类构造函数抛出 TypeError : __init__() takes 2 positional arguments but 5 were given

python - 如何知道网站的响应时间?

如果列表为空,Python 返回 False

python - 拆分字符串时正则表达式模式中的括号

python - ssl错误为什么用pip安装

python - 错误: You must give at least one requirement to install -- when running: pip install --upgrade --no-binary hdbscan