python:pip

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
最新のリビジョン両方とも次のリビジョン
python:pip [2024/03/27 06:40] – [システムの古い pip ラッパー📯が新しい pip モジュールを実行してしまう場合🤔] ともやんpython:pip [2024/03/28 01:06] – [ディストリビューションの pip を最新版に更新する場合] ともやん
行 500: 行 500:
 以下は pip パッケージを利用した HTTP URL のダウンローダーのコードである。\\ 以下は pip パッケージを利用した HTTP URL のダウンローダーのコードである。\\
 この **download_http_url()** 関数を利用すれば、パッケージではない様々なファイルを pip と同様に進行状況を表示しながらダウンロードする事ができる。\\ この **download_http_url()** 関数を利用すれば、パッケージではない様々なファイルを pip と同様に進行状況を表示しながらダウンロードする事ができる。\\
-\\  +<WRAP color_term
-<WRAP prewrap 100% #mincode_long+<WRAP color_mincode_long><code python pip_downloader.py>
-<code python pip_downloader.py>+
 #!/usr/bin/env python3 #!/usr/bin/env python3
 # -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
行 654: 行 653:
         _download_url(resp, link, content_file, hashes, progress_bar)         _download_url(resp, link, content_file, hashes, progress_bar)
     return file_path, content_type     return file_path, content_type
-</code>+</code></WRAP>
 </WRAP> </WRAP>
 pip_downloader.py の使い方。\\ pip_downloader.py の使い方。\\
-<WRAP prewrap 100%+<WRAP color_term
-<file python main.py>+<WRAP color_mincode><file python main.py>
 #!/usr/bin/env python3 #!/usr/bin/env python3
 ## -*- coding: utf-8 -*- ## -*- coding: utf-8 -*-
行 675: 行 674:
 if __name__ == "__main__": if __name__ == "__main__":
     main()     main()
-</file>+</file></WRAP>
 </WRAP> </WRAP>
 main.py 実行する。\\ main.py 実行する。\\
-<WRAP prewrap 100%+<WRAP color_term
-<code>+<WRAP color_command><code>
 > python main.py > python main.py
 +</code></WRAP>
 +<WRAP color_result><code>
 Downloading https://download.visualstudio.microsoft.com/download/pr/7b196ac4-65a9-4fde-b720-09b5339dbaba/78df39539625fa4e6c781c6a2aca7b4f/vs_community.exe (1.3MB) Downloading https://download.visualstudio.microsoft.com/download/pr/7b196ac4-65a9-4fde-b720-09b5339dbaba/78df39539625fa4e6c781c6a2aca7b4f/vs_community.exe (1.3MB)
 Downloading from URL https://download.visualstudio.microsoft.com/download/pr/7b196ac4-65a9-4fde-b720-09b5339dbaba/78df39539625fa4e6c781c6a2aca7b4f/vs_community.exe Downloading from URL https://download.visualstudio.microsoft.com/download/pr/7b196ac4-65a9-4fde-b720-09b5339dbaba/78df39539625fa4e6c781c6a2aca7b4f/vs_community.exe
    |████████████████████████████████| 1.4MB 3.3MB/s    |████████████████████████████████| 1.4MB 3.3MB/s
-</code>+</code></WRAP>
 </WRAP> </WRAP>
  
行 823: 行 824:
  
 === ディストリビューションの pip を最新版に更新する場合 === === ディストリビューションの pip を最新版に更新する場合 ===
-<code+<WRAP color_term
-$ python3 -m pip -V+<WRAP color_command><html><pre> 
 +<font color="#FF8700"><b>$</b></font> <font color="#26A269">python3</font> <font color="#A347BA">-m</font> pip <font color="#A347BA">-V</font> 
 +</pre></html></WRAP> 
 +<WRAP color_result><code>
 pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7) pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7)
-</code>+</code></WRAP> 
 +</WRAP>
  
 ディストリビューションの古い **python3-pip** パッケージだと不具合がある。\\ ディストリビューションの古い **python3-pip** パッケージだと不具合がある。\\
-<code+<WRAP color_term
-$ python3 -m pip list -v+<WRAP color_command><html><pre> 
 +<font color="#FF8700"><b>$</b></font> <font color="#26A269">python3</font> <font color="#A347BA">-m</font> pip list <font color="#A347BA">-v</font> 
 +</pre></html></WRAP> 
 +<WRAP color_result><code>
 Package    Version Location                       Installer Package    Version Location                       Installer
 ---------- ------- ------------------------------ --------- ---------- ------- ------------------------------ ---------
 pip        18.1    /usr/lib/python3/dist-packages pip        18.1    /usr/lib/python3/dist-packages
 setuptools 40.8.0  /usr/lib/python3/dist-packages setuptools 40.8.0  /usr/lib/python3/dist-packages
-</code>+</code></WRAP> 
 +</WRAP>
  
 pip を最新版に更新する。\\ pip を最新版に更新する。\\
-<WRAP prewrap 100%+<WRAP color_term
-<code+<WRAP color_command><html><pre
-$ python3 -m pip install -U pip+<font color="#FF8700"><b>$</b></font> <font color="#26A269">python3</font> <font color="#A347BA">-m</font> pip install <font color="#A347BA">-U</font> pip 
 +</pre></html></WRAP> 
 +<WRAP color_result><code>
 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
 Collecting pip Collecting pip
行 847: 行 858:
 Installing collected packages: pip Installing collected packages: pip
 Successfully installed pip-21.1.1 Successfully installed pip-21.1.1
-</code>+</code></WRAP>
 </WRAP> </WRAP>
  
 **pip list -o** が正常に利用できることを確認する。\\ **pip list -o** が正常に利用できることを確認する。\\
-<WRAP prewrap 100%+<WRAP color_term
-<code+<WRAP color_command><html><pre
-$ python3 -m pip list -o+<font color="#FF8700"><b>$</b></font> <font color="#26A269">python3</font> <font color="#A347BA">-m</font> pip install <font color="#A347BA">-U</font> pip 
 +</pre></html></WRAP> 
 +<WRAP color_result><code>
 Package    Version Latest Type Package    Version Latest Type
 ---------- ------- ------ ----- ---------- ------- ------ -----
 setuptools 40.8.0  56.2.0 wheel setuptools 40.8.0  56.2.0 wheel
-</code>+</code></WRAP> 
 +</WRAP>
  
-<code+<WRAP color_term
-$ python3 -m pip list -v+<WRAP color_command><html><pre> 
 +<font color="#FF8700"><b>$</b></font> <font color="#26A269">python3</font> <font color="#A347BA">-m</font> pip list <font color="#A347BA">-v</font> 
 +</pre></html></WRAP> 
 +<WRAP color_result><code>
 Package    Version Location                                         Installer Package    Version Location                                         Installer
 ---------- ------- ------------------------------------------------ --------- ---------- ------- ------------------------------------------------ ---------
 pip        21.1.1  /home/tomoyan/.local/lib/python3.7/site-packages pip pip        21.1.1  /home/tomoyan/.local/lib/python3.7/site-packages pip
 setuptools 40.8.0  /usr/lib/python3/dist-packages setuptools 40.8.0  /usr/lib/python3/dist-packages
-</code>+</code></WRAP>
 </WRAP> </WRAP>
  
  • python/pip.txt
  • 最終更新: 2024/03/28 01:58
  • by ともやん