Reference site: [Introduction to Python] What is the recommended installation method of pip for the package management system?
Python has a wealth of packages that you can combine to make programming easier and more sophisticated than in other languages. There is a mechanism called pip to manage those packages. pip is included as standard with the latest Python, but you will have to install it yourself if you have an older version of Python.
This time, I will explain how to install pip on Windows.
To install pip, you first need a package called distribute, so install distribute first. Download the distribute installer from the official page (link: https://pypi.python.org/pypi/distribute)
There are two versions of distribute, 0.7.3 and 0.6.49, but 0.7.3 has 0.6.49 already installed and can only be used when upgrading it, so download version 0.6.49 first. let's do it.
If you can download it, it is compressed, so unzip it. Open the unzipped folder and make sure you have a file called setup.py.
After confirming, let's start the command prompt in the hierarchy where setup.py is located. You can open a command prompt by holding down the shift key and left-clicking on the folder and clicking "Open Command Window Here" from the menu.
After opening a command prompt, type python setup.py install and press Enter. This will install distribute.
Once distribute is installed, you will be able to use the command "easy_install". Use this easy_install to install pip.
Go to the folder where python is installed and open the Scripts folder inside it. For example, if you have Python 3.2 installed, it will look like "C: \ Python32 \ Scripts". From there, start the command prompt as before.
First, check if easy_install is installed from the command prompt. Type "easy_install" and click Enter. If installed, it should look like the image below.
Once you have verified that easy_install is installed, type "easy_install pip" at the command prompt and press Enter. The pip installation will begin. After that, if you wait, the installation of pip will be completed.
There are several commands in pip, but basically we use the following two.
① pip install (package name)・ ・ ・ ・ Install the package
② pip uninstall (package name)・ ・ ・ Uninstall the package
You can find out about other commands by typing pip help to get help. There are many useful packages in Python, so please use pip to install various packages.
Recommended Posts