[Introduction to Python] What is the recommended way to install pip, a package management system?

Reference site: [Introduction to Python] What is the recommended installation method of pip for the package management system?

[Introduction to Python] What is the recommended way to install pip, a 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.

install distribute

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)

pip1-e1482987993277.png

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.

pip2.png

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.

pip3-e1482988055902.png

Install pip with easy_install

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.

pip4-e1482988090505.png

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.

pip5-e1482988123241.png

Basic usage of pip

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

[Introduction to Python] What is the recommended way to install pip, a package management system?
How to use pip, a package management system that is indispensable for using Python
[Introduction to Python] What is the difference between a list and a tuple?
What is the fastest way to create a reverse dictionary in python?
[Introduction to Python] What is the most powerful programming language now?
Install Python package management tool pip (Windows)
[Python] What is a formal argument? How to set the initial value
[Introduction to Python] What is the method of repeating with the continue statement?
[What is an algorithm? Introduction to Search Algorithm] ~ Python ~
Introduction to Python with Atom (on the way)
[Introduction to Udemy Python 3 + Application] 54. What is Docstrings?
[Introduction to Python] What is the important "if __name__ =='__main__':" when dealing with modules?
[Mac] A super-easy way to execute system commands in Python and output the results
What is a system call
What is a python map?
Probably the easiest way to create a pdf with Python3
Steps to install a Git cloned package locally with pip
Python> __init__.py> Required to handle the specified directory as a package (empty file is acceptable)
[Introduction to Python] How to split a character string with the split function
What to do if you can't install pyaudio with pip #Python
[Python] What is @? (About the decorator)
[python] What is the sorted key?
[Python] What is pip? Explain the command list and how to use it with actual examples
[Introduction to Python] How to use the in operator in a for statement?
What is the X Window System?
What to do if you get a UnicodeDecodeError with pip install
What is the python underscore (_) for?
The road to web application development is a long way off
What to do when the value type is ambiguous in Python?
[Introduction to Python3 Day 21] Chapter 10 System (10.1 to 10.5)
[Python] How to save the installed package and install it in a new environment at once Mac environment
What to do if there is a decimal in python json .dumps
What is the XX file at the root of a popular Python project?
[Introduction to Python] How to sort the contents of a list efficiently with list sort
How to install python package in local environment as a general user
Install the python module with pip on a server without root privileges
[Introduction to Python] How to write a character string with the format function
What is a C language library? What is the information that is open to the public?
How to automatically notify by phone when the python system is down
What to do when a warning message is displayed in pip list
A super introduction to Python bit operations
Python installation and package management with pip
What is "mahjong" in the Python library? ??
What is a dog? Python installation volume
[python] [meta] Is the type of python a type?
Install python on xserver to use pip
A way to understand Python duck typing
I can't install the package with pip.
I tried to explain what a Python generator is for as easily as possible.
I failed to install django with pip, so a reminder of the solution
This is the best way to become a full-fledged technical support! 10 personal masterpieces
If you try to install Python2 pip after installing Python3 pip and it is rejected
[Introduction to Python] How to get the index of data with a for statement
The fastest way for beginners to master Python
What is the difference between `pip` and` conda`?
Introduction to Python Let's prepare the development environment
[Introduction to AWS] The first Lambda is Transcribe ♪
The easiest way to synthesize speech with python
What is wheezy in the Docker Python image?
Note: What to do if pip install fails
Install the python package in an offline environment