How to use pip, a package management system that is indispensable for using Python

This is an edited version of the "** Kikagaku Online **" article for Qiita.

———————————

I will explain the package management system called pip, which is indispensable for using Python.

What is a package management system in the first place?

It is a system that manages libraries and packages for efficient programming so that they can be handled easily.

We covered the importance of libraries in a previous article.

Three reasons why machine learning learners should use Python

Each major programming language has a well-known package management system. In the case of Python, that's ** pip **.

I have to use a package management system ...?

Installing the package can be a hassle.

This is because packages may depend on each other.

For example, I tried to install Package A, but Package A uses Package B internally, and I need to install Package B first.

It's easy to imagine that if this involves more packages, it will be difficult to install.

How to use pip

Now that you know the importance of a package management system, let's take a look at the main uses of pip. The Python installation is very well documented in the article below, so be sure to check it out.

  1. Python installation (Mac version) → Mac users
  2. Python installation and environment settings → Windows users

Make sure you have the latest version of Python (version 3.5.2 is the latest at the moment). Then pip should be installed, so if you type pip on the console (command prompt on Windows), it should look like this:

$ pip -V
pip 8.1.2 from ~

Package installation

To install the package, use the following command.

$pip install package

Package update

You can update the installed packages with the following command.

$ pip install -U package

Uninstall a package

To uninstall the package, use the following command.

$pip uninstall package

Search for packages

You can search for packages that can be installed with the following command.

$pip search search word

List installed packages

You can see the list of installed packages.

$ pip list

Check the details of installed packages

If you want to know more information about the installed packages, use the following command.

$pip show package

pip own update

Update pip itself as follows.

pip install --upgrade pip

View help

If you want to know how to use pip, use the following command.

pip -h

It's a good idea to check the help frequently until you get used to it.

in conclusion

There are many other options for pip, but I think that you can use it at least if you keep it down for the time being. It's an indispensable tool for learning machine learning, so let's remember it well!

Kikagaku Online

** Kikagaku Online ** delivers articles for introductory machine learning. We handle a wide range of articles, from basic course articles for those who want to learn machine learning, artificial intelligence, and deep learning, to business introduction examples using machine learning.

Recommended Posts

How to use pip, a package management system that is indispensable for using Python
[Introduction to Python] What is the recommended way to install pip, a package management system?
How to make a Python package using VS Code
How to make a Python package (written for an intern)
A python script that wants to use Mac startup / end time for attendance management
[Introduction to Python] How to use the in operator in a for statement?
How to install a package using a repository
[Python] Organizing how to use for statements
How to use "deque" for Python data
How to use is and == in Python
How to use hmmlearn, a Python library that realizes hidden Markov models
Tips for those who are wondering how to use is and == in Python
[BigQuery] How to use BigQuery API for Python -Table creation-
[For beginners] How to use say command in python!
How to set up a Python environment using pyenv
[Python] How to write a docstring that conforms to PEP8
How to execute a command using subprocess in Python
[Introduction to Python] How to write repetitive statements using for statements
How to use the Slack API using Python to delete messages that have passed a certain period of time for a specific user on a specific channel
Tips for Python beginners to use the Scikit-image example for themselves 7 How to make a module
How to use a library that is not originally included in Google App Engine
python3: How to use bottle (2)
[Python] How to use list 1
How to use Python argparse
Python: How to use pydub
[Python] How to use checkio
[Python] How to use input ()
How to use Python lambda
[Python] How to use virtualenv
python3: How to use bottle (3)
python3: How to use bottle
How to use Python bytes
How to test that Exception is raised in python unittest
[python] How to use the library Matplotlib for drawing graphs
How to use the __call__ method in a Python class
How to transpose a 2D array using only python [Note]
How to define multiple variables in a python for statement
How to use machine learning for work? 03_Python coding procedure
How to write a test for processing that uses BigQuery
I didn't know how to use the [python] for statement
How to write a metaclass that supports both python2 and python3
Use a scripting language for a comfortable C ++ life-OpenCV-Port Python to C ++-
I tried using a library (common thread) that makes Python's threading package easier to use
[Python] What is a tuple? Explains how to use without tuples and how to use it with examples.
A memorandum of understanding for the Python package management tool ez_setup
[Python] What is a slice? An easy-to-understand explanation of how to use it with a concrete example.
How to write a Python class
Python: How to use async with
I want to use a wildcard that I want to shell with Python remove
[Python] How to use Pandas Series
A story that struggled to handle the Python package of PocketSphinx
How to use Requests (Python Library)
How to use SQLite in Python
How to create a Conda package
Hypothesis / Verification (176) How to make a textbook that is easier than "The easiest textbook for quantum computers"
How to judge that the cross key is input in Python3
Basic grammar of Python3 system (how to use functions, closures, lambda functions)
[Python] What is pip? Explain the command list and how to use it with actual examples
How to use the asterisk (*) in Python. Maybe this is all? ..
How to build a Python environment using Virtualenv on Ubuntu 18.04 LTS
[For beginners] How to register a library created in Python in PyPI