Lang/Python/pip
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
#topicpath
/////////////////////////////////////////////////////////...
* 目次 [#j87cd01d]
#contents();
/////////////////////////////////////////////////////////...
* pip [#a3187204]
- pip とは、Python のパッケージモジュールを管理するシステ...
- pip には、Python2.x 用と Python3.x 用があり、それぞれの...
//=======================================================...
** pip の install --- OSのパッケージシステムを利用する場...
+ debian の場合は以下でインストールする:
# apt-get install python-pip python3-pip
//=======================================================...
** pip の install --- OSのパッケージシステムを利用しない...
+ get-pip.py を入手する
$ curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pi...
+ get-pip.py を使って pip3 をインストールする
$ python3 get-pip.py
Defaulting to user installation because normal site-pack...
Collecting pip
Downloading pip-20.0.2-py2.py3-none-any.whl (1.4 MB)
|████████████████████████████████| 1.4 MB 3.1 MB/s
Collecting setuptools
Downloading setuptools-46.0.0-py3-none-any.whl (582 kB)
|████████████████████████████████| 582 kB 5.5 MB/s
Collecting wheel
Downloading wheel-0.34.2-py2.py3-none-any.whl (26 kB)
Installing collected packages: pip, setuptools, wheel
WARNING: The scripts pip, pip3 and pip3.5 are installe...
Consider adding this directory to PATH or, if you pref...
WARNING: The scripts easy_install and easy_install-3.5...
Consider adding this directory to PATH or, if you pref...
WARNING: The script wheel is installed in '/home/yourn...
Consider adding this directory to PATH or, if you pref...
Successfully installed pip-20.0.2 setuptools-46.0.0 whee...
-- root にならなくても実行出来る。その場合、上記ログのよ...
$ ls ~/.local/
bin lib share tmp
$ ls ~/.local/bin
easy_install easy_install-3.5 pip pip3 pip3.5 wheel
$ ls ~/.local/lib/python3.5/site-packages/
__pycache__ pip-20.0.2.dist-info setuptools-46.0.0...
easy_install.py pkg_resources wheel
pip setuptools wheel-0.34.2.dist...
+ ${HOME}/.local/bin を環境変数 PATH に加えれば、pip/pip3...
//=======================================================...
** pip を使った Python モジュールの管理 [#sf40745f]
- install
$ pip install <パッケージ名>
- uninstall
$ pip uninstall <パッケージ名>
- インストール済みパッケージの一覧表示
$ pip list
//=======================================================...
** バージョンを指定してモジュールをインストールする [#vbc...
- pip install では、インストールするモジュールのバージョ...
- 指定したバージョンでモジュールをインストールする
$ pip install <module>==<version>
-- 例:numpy の version 1.23 をインストールする
$ pip install numpy==1.23
- バージョンの上限を指定してモジュールをインストールする
$ pip install '<module><<latest-version>'
-- 例:numpy の version 1.20 未満の範囲で最新をインストー...
$ pip install 'numpy<1.20'
- バージョンの下限と上限を指定してモジュールをインストー...
$ pip install '<module>>=<oldest-version>,<<latest-versi...
-- 例:numpy の version 1.20 以上 1.23 未満の範囲で最新を...
$ pip install 'numpy>=1.20,<1.23'
//=======================================================...
** どんなバージョンがあるかを知りたい場合 [#r17d722b]
- 調査中
終了行:
#topicpath
/////////////////////////////////////////////////////////...
* 目次 [#j87cd01d]
#contents();
/////////////////////////////////////////////////////////...
* pip [#a3187204]
- pip とは、Python のパッケージモジュールを管理するシステ...
- pip には、Python2.x 用と Python3.x 用があり、それぞれの...
//=======================================================...
** pip の install --- OSのパッケージシステムを利用する場...
+ debian の場合は以下でインストールする:
# apt-get install python-pip python3-pip
//=======================================================...
** pip の install --- OSのパッケージシステムを利用しない...
+ get-pip.py を入手する
$ curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pi...
+ get-pip.py を使って pip3 をインストールする
$ python3 get-pip.py
Defaulting to user installation because normal site-pack...
Collecting pip
Downloading pip-20.0.2-py2.py3-none-any.whl (1.4 MB)
|████████████████████████████████| 1.4 MB 3.1 MB/s
Collecting setuptools
Downloading setuptools-46.0.0-py3-none-any.whl (582 kB)
|████████████████████████████████| 582 kB 5.5 MB/s
Collecting wheel
Downloading wheel-0.34.2-py2.py3-none-any.whl (26 kB)
Installing collected packages: pip, setuptools, wheel
WARNING: The scripts pip, pip3 and pip3.5 are installe...
Consider adding this directory to PATH or, if you pref...
WARNING: The scripts easy_install and easy_install-3.5...
Consider adding this directory to PATH or, if you pref...
WARNING: The script wheel is installed in '/home/yourn...
Consider adding this directory to PATH or, if you pref...
Successfully installed pip-20.0.2 setuptools-46.0.0 whee...
-- root にならなくても実行出来る。その場合、上記ログのよ...
$ ls ~/.local/
bin lib share tmp
$ ls ~/.local/bin
easy_install easy_install-3.5 pip pip3 pip3.5 wheel
$ ls ~/.local/lib/python3.5/site-packages/
__pycache__ pip-20.0.2.dist-info setuptools-46.0.0...
easy_install.py pkg_resources wheel
pip setuptools wheel-0.34.2.dist...
+ ${HOME}/.local/bin を環境変数 PATH に加えれば、pip/pip3...
//=======================================================...
** pip を使った Python モジュールの管理 [#sf40745f]
- install
$ pip install <パッケージ名>
- uninstall
$ pip uninstall <パッケージ名>
- インストール済みパッケージの一覧表示
$ pip list
//=======================================================...
** バージョンを指定してモジュールをインストールする [#vbc...
- pip install では、インストールするモジュールのバージョ...
- 指定したバージョンでモジュールをインストールする
$ pip install <module>==<version>
-- 例:numpy の version 1.23 をインストールする
$ pip install numpy==1.23
- バージョンの上限を指定してモジュールをインストールする
$ pip install '<module><<latest-version>'
-- 例:numpy の version 1.20 未満の範囲で最新をインストー...
$ pip install 'numpy<1.20'
- バージョンの下限と上限を指定してモジュールをインストー...
$ pip install '<module>>=<oldest-version>,<<latest-versi...
-- 例:numpy の version 1.20 以上 1.23 未満の範囲で最新を...
$ pip install 'numpy>=1.20,<1.23'
//=======================================================...
** どんなバージョンがあるかを知りたい場合 [#r17d722b]
- 調査中
ページ名: