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.
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 **.
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.
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.
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 ~
To install the package, use the following command.
$pip install package
You can update the installed packages with the following command.
$ pip install -U package
To uninstall the package, use the following command.
$pip uninstall package
You can search for packages that can be installed with the following command.
$pip search search word
You can see the list of installed packages.
$ pip list
If you want to know more information about the installed packages, use the following command.
$pip show package
Update pip itself as follows.
pip install --upgrade pip
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.
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 ** 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