Python: Установить Pip — MacOS, Ubuntu, CentOS

Что такое Pip? pip — это инструмент для установки и управления пакетами (модулями) в Python.

pip, также как и Python, может быть уставлен на множество операционных систем: Linux, Mac, Windows и т.п.

В этом посте я показываю как установить pip на MacOS и как установить pip в Linux (Ubuntu и CentOS).

Дельный Совет: Установка конкретной версии пакет в pip! Читать далее →

Python: Установить Pip

Чтобы установить последнюю версию pip, в зависимости от вашей операционной системы, выполните приведенные ниже команды.

Установить Pip на MacOS

Установить pip на MacOS с помощью команды easy_install и обновить pip до последней версии:

$ sudo easy_install pip
$ sudo pip install --upgrade pip

Установить Pip в Ubuntu

Установить pip в Ubuntu с помощью менеджера пакетов apt-get:

$ sudo apt-get update
$ sudo apt-get install python-pip
$ sudo pip install --upgrade pip

Install Pip on CentOS

Установить pip в CentOS из репозитория EPEL с помощью менеджера пакетов yum:

$ sudo yum update
$ sudo yum install epel-release
$ sudo yum install python-pip
# CentOS-7 и выше
$ sudo pip install --upgrade pip
# CentOS-6 (последняя стабильная версия PIP совместимая с Python 2.6)
$ sudo pip install pip==9.0.3

7 Replies to “Python: Установить Pip — MacOS, Ubuntu, CentOS”

  1. Hi, I am a mac user and tried to install pip using the easy_install pip command and I got this message on my terminal :

    error: can’t create or remove files in install directory

    The following error occurred while trying to add or remove files in the
    installation directory:
    [Errno 13] Permission denied: ‘/Library/Python/2.7/site-packages/test-easy-install-59336.pth’
    The installation directory you specified (via —install-dir, —prefix, or
    the distutils default setting) was:
    Perhaps your account does not have write access to this directory? If the
    installation directory is a system-owned directory, you may need to sign in
    as the administrator or «root» account. If you do not have administrative
    access to this machine, you may wish to choose a different installation
    directory, preferably one that is listed in your PYTHONPATH environment
    For information on other options, you may wish to consult the
    documentation at:
    Please make the appropriate changes for your system and try again.

    I am the main and only user of my mac, so I don’t really know why they mention the root account.
    Have you ever come across or heard about this type of problem before ? Would be a huge help if you had any tiny information about that.
    Thanks a lot!


    1. I think you forgot include «sudo» in your type

  2. For macOS High Sierra, I have to manually install the latest python package and use the pip3 command instead.

  3. hey tried this as it is asking me the password!!!!!
    what to do??

    1. You need to use the password for your computer to install.

    Searching for pip
    Download error on [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)
    Download error on [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’)

Добавить комментарий