Windows where is pip

Where is pip installed to when using get-pip.py?

I just installed pip on OS X using the get-pip.py script provided by the developers. The script said it ran successfully, but I cannot execute pip from the command line. I guess pip is not in my path, but I don’t know where it installed to so I can’t add it to the path. Any help would be most excellent. Thanks!

When I attempt to run the install script again, here is the output:

7 Answers 7

If you can’t find the path to pip you can simply use python -m pip instead:

Do you know your python path? If yes, then look under the Scripts directory.

For me (Windows user), pip it is located in

Correspondingly for Linux, it should be inside

Also, if you have Homebrew installed, pip installs with python:

And, the fact that you have python & pip installed & cannot get pip but can get python from the command line (path), pip must have been misconfigured.

If you still can’t find it, you can use locate pip for Linux, or a corresponding search method for other OSs. Also, in your case, it already seems to be in

as per the output message.

On linux you can use:

To find the location of pip.

pip binary is named pip3 for python 3

If you are getting a message Requirement already up-to-date that means pip is already installed on your system and you either don’t have the directory which contains the pip program in your path or you are not calling pip correctly.

If you are using bash, type «pi» and hit tab twice. You will get commands starting with pi and hopefully you will see pip3. Here’s why:

Python — cant find pip.ini or pip.conf in Windows

I got Python 2.7.8 installed on my Win7 machine, which comes with pip already pre-installed.
I’m successfully able to install new packages from pip and now I need to add custom repository url to the install list of pip

To do so I need to modify pip.ini which is in %APPDATA%\pip\pip.ini according to the Official Manual
However there are no pip folder anywhere (not in Roaming , not in Local , not in LocalLow ) nor there exists PyPa folder in: C:\ProgramData\PyPA\pip\pip.conf

Could you tell me where do i search for pip.ini ? how to add foreign repo to the install list?

11 Answers 11

Instead of checking a list of well-known locations, you can ask pip to list the valid locations:

Fun fact

Читайте также:  Emoji для mac os

On the same machine, with the same pip version, the valid locations can vary based on the actual Python version.

Environment: Win 7 x64, the HOME environment variable is set to D:\Home

Finally got it sorted.

Apparently for Windows users pip.ini config file is not created, however can be added manually!

just create new %APPDATA%\pip\pip.ini and content of custom repository:

A bit late, but for reference: Try adding the pip.ini file in %USERPROFILE%\pip\pip.ini (usually: C:\Users\ \pip\pip.ini ).

On windows pip.exe looks for «pip.ini» in this order:

pip —version >= 6 (as of version 18.1 hasn’t changed again yet)

pip —version

All the answers are partially wrong and right. It depends on how your system is configured. The only way (for me) to find out was to patch site-packages/pip/locations.py at the point where site_config_files is assigned (around line 120 for pip 9.0.1)

and then run pip search foo

On my system it printed ########## [‘C:\\ProgramData\\pip\\pip.ini’] , of which location I assumed I could not create/edit. But it just worked.

Btw, for my system %APPDATA% points to C:\Users\MYUSER\AppData\Roaming , which is not looked at when running pip on my system.

Rather than guessing first check if you have any default global/local config which is read by pip with the below command:

This will give all details of the default config loaded by python.

If the above command doesn’t give any output please try to find where pip tries to find for the global config file with the below command:

The above command will open the config file which pip reads by default or else it will give an error saying that the file doesn’t exist.

If there’s an error please go ahead and create the exact directory and file structure as show in the error. Once the file has been created please make your changes e.g.

Save the file and please try to check (the above mentioned check command) if the configs are loaded by pip or not.

For more info please follow pip config documentation

Установка PIP для Python и базовые команды

Как любой серьёзный язык программирования, Python поддерживает сторонние библиотеки и фреймворки. Их устанавливают, чтобы не изобретать колесо в каждом новом проекте. Необходимы пакеты можно найти в центральном репозитории Python — PyPI (Python Package Index — каталог пакетов Python).

Однако скачивание, установка и работа с этими пакетами вручную утомительны и занимают много времени. Именно поэтому многие разработчики полагаются на специальный инструмент PIP для Python, который всё делает гораздо быстрее и проще.

Что такое PIP для Python?

Сама аббревиатура — рекурсивный акроним, который на русском звучит как “PIP установщик пакетов” или “Предпочитаемый установщик программ”. Это утилита командной строки, которая позволяет устанавливать, переустанавливать и деинсталлировать PyPI пакеты простой командой pip .

Если вы когда-нибудь работали с командной строкой Windows и с терминалом на Linux или Mac и чувствуете себя уверенно, можете пропустить инструкции по установке.

Устанавливается ли PIP вместе с Python?

Если вы пользуетесь Python 2.7.9 (и выше) или Python 3.4 (и выше), PIP устанавливается вместе с Python по умолчанию. Если же у вас более старая версия Python, то сначала ознакомьтесь с инструкцией по установке.

Правильно ли Python установлен?

Вы должны быть уверены, что Python должным образом установлен на вашей системе. На Windows откройте командную строку с помощью комбинации Win+X . На Mac запустите терминал с помощью Command+пробел , а на Linux – комбинацией Ctrl+Alt+T или как-то иначе именно для вашего дистрибутива.

Читайте также:  Диск для резервного копирования системы windows

Затем введите команду:

На Linux пользователям Python 3.x следует ввести:

Если вы получили номер версии (например, Python 2.7.5 ), значит Python готов к использованию.

Если вы получили сообщение Python is not defined (Python не установлен), значит, для начала вам следует установить Python. Это уже не по теме статьи. Подробные инструкции по установке Python читайте в теме: Скачать и установить Python.

Как установить PIP на Windows.

Следующие инструкции подойдут для Windows 7, Windows 8.1 и Windows 10.

  1. Скачайте установочный скрипт get-pip.py. Если у вас Python 3.2, версия get-pip.py должны быть такой же. В любом случае щелкайте правой кнопкой мыши на ссылке и нажмите “Сохранить как…” и сохраните скрипт в любую безопасную папку, например в “Загрузки”.
  2. Откройте командную строку и перейдите к каталогу с файлом get-pip.py.
  3. Запустите следующую команду: python get-pip.py

Как установить PIP на Mac

Современные версии Mac идут с установленными Python и PIP. Так или иначе версия Python устаревает, а это не лучший вариант для серьёзного разработчика. Так что рекомендуется установить актуальные версии Python и PIP.

Если вы хотите использовать родную систему Python, но у вас нет доступного PIP, его можно установить следующей командой через терминал:

Если вы предпочитаете более свежие версии Python, используйте Homebrew. Следующие инструкции предполагают, что Homebrew уже установлен и готов к работе.

Установка Python с помощью Homebrew производится посредством одной команды:

Будет установлена последняя версия Python, в которую может входить PIP. Если после успешной установки пакет недоступен, необходимо выполнить перелинковку Python следующей командой:

Как установить PIP на Linux

Если у вас дистрибутив Linux с уже установленным на нем Python, то скорее всего возможно установить PIP, используя системный пакетный менеджер. Это более удачный способ, потому что системные версии Python не слишком хорошо работают со скриптом get-pip.py, используемым в Windows и Mac.

Advanced Package Tool (Python 2.x)

Advanced Package Tool (Python 3.x)

pacman Package Manager (Python 2.x)

pacman Package Manager (Python 3.x)

Yum Package Manager (Python 2.x)

Yum Package Manager (Python 3.x)

Dandified Yum (Python 2.x)

Dandified Yum (Python 3.x)

Zypper Package Manager (Python 2.x)

Zypper Package Manager (Python 3.x)

Как установить PIP на Raspberry Pi

Как пользователь Raspberry, возможно, вы запускали Rapsbian до того, как появилась официальная и поддерживаемая версия системы. Можно установить другую систему, например, Ubuntu, но в этом случае вам придётся воспользоваться инструкциями по Linux.

Начиная с Rapsbian Jessie, PIP установлен по умолчанию. Это одна из серьёзных причин, чтобы обновиться до Rapsbian Jessie вместо использования Rapsbian Wheezy или Rapsbian Jessie Lite. Так или иначе, на старую версию, все равно можно установить PIP.

На Rapsbian для Python 2.x следует пользоваться командой pip, а для Python 3.x — командой pip3 при использовании команд для PIP.

Как обновить PIP для Python

Пока PIP не слишком часто обновляется самостоятельно, очень важно постоянно иметь свежую версию. Это может иметь значение при исправлении багов, совместимости и дыр в защите.

К счастью, обновление PIP проходит просто и быстро.

Для Mac, Linux, или Raspberry Pi:

На текущих версиях Linux и Rapsbian Pi следует использовать команду pip3.

Как устанавливать библиотеки Python с помощью PIP

Если PIP работоспособен, можно начинать устанавливать пакеты из PyPI:

Читайте также:  Vipnet csp службы windows

Установка определённой версии вместо новейшей версии пакета:

Поиск конкретного пакета:

Просмотр деталей об установленном пакете:

Список всех установленных пакетов:

Список всех устаревших пакетов:

Обновление устаревших пакетов:

Следует отметить, что старая версия пакета автоматически удаляется при обновлении до новой версии.

Полностью переустановить пакет:

Полностью удалить пакет:

Подписывайтесь на канал в Дзене

Полезный контент для начинающих и опытных программистов в канале Лента Python разработчика — Как успевать больше, делать лучше и не потерять мотивацию.

Python. pip — пакетный менеджер (windows)

Часто при работе с питоном нам потребуется пакетный менеджер pip .

Менеджер pip позволяет загружать пакеты и управлять ими. Часто, при установке python устанавливается и менеджер pip .

Мы можем проверить версию менеджера, выполнив в командной строке/терминале следующую команду:

мы увидим актуальную информацию о версии менеджера pip

Если pip не установлен, то мы увидим ошибку типа » pip » не является внутренней или внешней командой, исполняемой программой или пакетным файлом. В этом случае нам надо установить менеджер pip .

Для этого нам надо загрузить скрипт https://bootstrap.pypa.io/get-pip.py . Просто перейдем на эту страницу и сохраним все ее содержимое в новый файл get-pip.py . Сохраним файл, например, в папку с:\python . Перейдем в папку d:\python , где сохранен файл и введем в командной строке/консоли следующую команду:

Если менеджер pip ранее уже был установлен, то можно его обновить с помощью команды

pip install —upgrade pip

Удаление менеджера пакетов pip

Для этого введем команду

easy_install -m pip

Это не может полностью удалить pip . Поэтому введем команду

pip uninstall pip

если по предыдущей команде pip был удален, то эта команда не будет работать, иначе она полностью удалит pip

Теперь проверим, введем команду

Мы увидим ошибку типа «pip» не является внутренней или внешней командой, исполняемой программой или пакетным файлом.

Where does PIP Store / Save Python 3 Modules / Packages on Windows 8?

I have looked everywhere and can’t find where the packages are installed.

Further, are the packages from pip, modules, libraries or just packages in python terminology?

4 Answers 4

for python 3.X default location C:\Users\username \AppData\Local\Programs\Python\Python36\Lib\site-packages

Python usually stores its library (and thereby your site-packages folder) in the installation directory. So, if you had installed Python to C:\Python\, the default library would reside in C:\Python\Lib\ and third-party modules should be stored in C:\Python\Lib\site-packages.

Use this command to list global packages with their locations:

When using virtual environment the local packages is located in project folder:

It depends on how/where your python was installed.

  • if you are using Conda for your python, you will most likely find your packages in the default location of:
  • Whereas, if you installed Python3.8 as a stand-alone, you will find it under:

where if you install a simply pip package (that did not use any specific locations), and just having some scripts, it will end up in:

Noting that if the script depend on libraries, it will probably not work, as they will not be found from this location, if installed on Windows, and not taking this into account.

  • Or if you used Cygwin , they’ll end up in one of:

Again, you best bet is to check with:

There is also a pip package called pip-date that contain a utility called pipbyday that will show you the location of each package and the installation time.

Оцените статью