PIPの使用:PIPを使用してnumpyをインストールする

3074 ワード

PIPはpythonのパッケージ管理ツールです.pythonパッケージの検索、ダウンロード、インストール、アンインストールの機能を提供します.
pipをインストールしたら、環境変数:C:Python 27Scriptsにpipを追加します.
numpyを例にpipの使用を説明します:まず、whlファイルをダウンロードします.アドレスhttps://pypi.python.org/pypi/numpypipをダウンロードします.ここでダウンロードしたのはnumpy-1.12.1 rc 1-cp 27-none-winです.amd64.whl
(インストール)CDが該当するディレクトリに到達した後、該当するディレクトリにコマンドを実行した後、コマンドpip install numpy-1.12.1 rc 1-cp 27-none-win_amd64.whl
D:\>pip install numpy-1.12.1rc1-cp27-none-win_amd64.whl
Processing d:\numpy-1.12.1rc1-cp27-none-win_amd64.whl
Installing collected packages: numpy
Successfully installed numpy-1.12.1rc1

Successfully installedはインストールに成功したことを示します.
(パケット情報を表示)インストールに成功した後、コマンドpip show numpyでパケット情報を表示できるのに.
D:\>pip show numpy
Name: numpy
Version: 1.12.1rc1
Summary: NumPy: array processing for numbers, strings, records, and objects.
Home-page: http://www.numpy.org
Author: NumPy Developers
Author-email: numpy-discussion@scipy.org
License: BSD
Location: c:\python27\lib\site-packages
Requires:

(インストールされているすべてのパッケージを検索)pip listコマンドを使用して、インストールされているすべてのパッケージを表示します.
D:\>pip list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
numpy (1.12.1rc1)
pip (9.0.1)
setuptools (28.8.0)

(アンインストールパッケージ)pip uninstall numpy