简体   繁体   English

在我的 Mac 中安装 pip 时出错

[英]Getting an error installing pip in my Mac

I am trying to install PIP package management system in my Mac but I am getting an error.我正在尝试在我的 Mac 中安装 PIP 包管理系统,但出现错误。

When I am writing a cod sudo easy_install pip , it is giving me following error:当我编写 cod sudo easy_install pip ,它给了我以下错误:

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')

Can anyone help me to understand this?任何人都可以帮助我理解这一点吗?

The easy solution is download and install the latest version of Python 3. Just grab the dmg from the website https://www.python.org/downloads/release/python-370/ Verify it was installed.简单的解决方案是下载并安装最新版本的 Python 3。只需从网站https://www.python.org/downloads/release/python-370/获取 dmg 验证它是否已安装。

$ python3 --version
Python 3.7.0

Pip is automatically included in this version so update it. Pip 自动包含在此版本中,因此请更新它。 Note use pip3 for Python 3.x注意 Python 3.x 使用 pip3

$ pip3 install --upgrade pip 
 Successfully uninstalled pip-10.0.1
 Successfully installed pip-18.0

This worked for me:这对我有用:

Make sure you installed python确保你安装了python

$ python3 --version

Then install pip然后安装pip

$ python3 -m pip install --user --upgrade pip

$ python3 -m pip --version

for more check here:更多检查在这里:

https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/ https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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