python:venv

差分

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

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
python:venv [2023/02/10 12:38] ともやんpython:venv [2023/03/08 19:50] (現在) ともやん
行 4: 行 4:
  
 ==== Linux ==== ==== Linux ====
-<code+<WRAP color_term
-$ python -m venv py38 +<WRAP color_command><html><pre> 
-</code>+<b class=GRN>$</b> <b class=HIY>python</b> <b class=HIK>-m</b> venv py38 
 +</pre></html></WRAP> 
 +<WRAP color_result><html><pre> 
 +</pre></html></WRAP> 
 +</WRAP>
 ^py38^^^| 仮想環境フォルダ  | ^py38^^^| 仮想環境フォルダ  |
 | + ^include^^^^ | + ^include^^^^
行 24: 行 28:
  
 ==== Windows ==== ==== Windows ====
-<code+<WRAP color_term
-> python -m venv py38 +<WRAP color_command><html><pre> 
-</code>+<b class=GRN>></b> <b class=HIY>python</b> <b class=HIK>-m</b> venv py38 
 +</pre></html></WRAP> 
 +<WRAP color_result><html><pre> 
 +</pre></html></WRAP> 
 +</WRAP>
 ^py38^^| 仮想環境フォルダ  | ^py38^^| 仮想環境フォルダ  |
 | + ^Include^^^ | + ^Include^^^
行 42: 行 50:
  
 ==== Linux ==== ==== Linux ====
-<code+<WRAP color_term
-source py38/bin/activate +<WRAP color_command><html><pre> 
-(py38) $ +<b class=GRN>$</b> <b class=HIY>.</b> py38/bin/activate 
-</code>+(py38) <b class=GRN>$</b> 
 +</pre></html></WRAP> 
 +<WRAP color_result><html><pre> 
 +</pre></html></WRAP> 
 +</WRAP>
 または または
-<code+<WRAP color_term
-py38/bin/activate +<WRAP color_command><html><pre> 
-(py38) $ +<b class=GRN>$</b> <b class=HIY>source</b> py38/bin/activate 
-</code>+(py38) <b class=GRN>$</b> 
 +</pre></html></WRAP> 
 +<WRAP color_result><html><pre> 
 +</pre></html></WRAP> 
 +</WRAP>
  
 ==== Windows ==== ==== Windows ====
-<code+<WRAP color_term
-> py38\Scripts\activate +<WRAP color_command><html><pre> 
-(py38) > +<b class=GRN>></b> py38/bin/activate 
-</code>+(py38) <b class=GRN>></b> 
 +</pre></html></WRAP> 
 +<WRAP color_result><html><pre> 
 +</pre></html></WRAP
 +</WRAP>
  
 ===== 仮想環境の pip を更新 ===== ===== 仮想環境の pip を更新 =====
  
 ==== Linux ==== ==== Linux ====
-<code+<WRAP color_term> 
-(py38) $ python -m pip install --upgrade pip +<WRAP color_command><html><pre
-</code>+(py38) <b class=GRN>$</b> <b class=HIY>python</b> <b class=HIK>-m</b> pip install <b class=HIK>-U</b> pip 
 +</pre></html></WRAP> 
 +<WRAP color_result><html><pre> 
 +</pre></html></WRAP> 
 +</WRAP> 
 +または 
 +<WRAP color_term> 
 +<WRAP color_command><html><pre> 
 +(py38) <b class=GRN>$</b> <b class=HIY>python</b> <b class=HIK>-m</b> pip install <b class=HIK>--upgrade</b> pip 
 +</pre></html></WRAP> 
 +<WRAP color_result><html><pre> 
 +</pre></html></WRAP> 
 +</WRAP>
  
 ==== Windows ==== ==== Windows ====
-<code+<WRAP color_term> 
-(py38) > python -m pip install --upgrade pip +<WRAP color_command><html><pre
-+(py38) <b class=GRN>></b> <b class=HIY>python</b> <b class=HIK>-m</b> pip install <b class=HIK>-U</b> pip 
-</code>+</pre></html></WRAP> 
 +<WRAP color_result><html><pre> 
 +</pre></html></WRAP> 
 +</WRAP> 
 +または 
 +<WRAP color_term> 
 +<WRAP color_command><html><pre> 
 +(py38) <b class=GRN>></b> <b class=HIY>python</b> <b class=HIK>-m</b> pip install <b class=HIK>--upgrade</b> pip 
 +</pre></html></WRAP> 
 +<WRAP color_result><html><pre> 
 +</pre></html></WRAP
 +</WRAP>
  
 ===== 仮想環境の終了 ===== ===== 仮想環境の終了 =====
  
 ==== Linux ==== ==== Linux ====
-<code+<WRAP color_term> 
-(py38) $ deactivate +<WRAP color_command><html><pre
-$ +(py38) <b class=GRN>$</b> <b class=HIY>deactivate</b> 
-</code>+</pre></html></WRAP> 
 +<WRAP color_result><html><pre> 
 +</pre></html></WRAP> 
 +</WRAP>
  
 ==== Windows ==== ==== Windows ====
-<code+<WRAP color_term> 
-(py38) > deactivate +<WRAP color_command><html><pre
-+(py38) <b class=GRN>></b> <b class=HIY>deactivate</b> 
-</code>+</pre></html></WRAP> 
 +<WRAP color_result><html><pre> 
 +</pre></html></WRAP
 +</WRAP>
  
 ===== トラブルシューティング ===== ===== トラブルシューティング =====
行 90: 行 139:
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-(pyJupyterLab) $ pip freeze+(pyJupyterLab) <b class=GRN>$</b> <b class=HIY>pip</b> freeze
 </pre></html></WRAP> </pre></html></WRAP>
 <WRAP color_result><html><pre> <WRAP color_result><html><pre>
行 103: 行 152:
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-(pyJupyterLab) $ cat pyvenv.cfg +(pyJupyterLab) <b class=GRN>$</b> <b class=HIY>cat</b> pyvenv.cfg 
 </pre></html></WRAP> </pre></html></WRAP>
 <WRAP color_result><html><pre> <WRAP color_result><html><pre>
行 111: 行 160:
 </pre></html></WRAP> </pre></html></WRAP>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-(pyJupyterLab) $ python -V+(pyJupyterLab) <b class=GRN>$</b> <b class=HIY>python</b> -V
 </pre></html></WRAP> </pre></html></WRAP>
 <WRAP color_result><html><pre> <WRAP color_result><html><pre>
行 122: 行 171:
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-(pyJupyterLab) $ cd lib +(pyJupyterLab) <b class=GRN>$</b> <b class=HIY>cd</b> lib 
-(pyJupyterLab) $ ln -s python3.10/ python3.11 +(pyJupyterLab) <b class=GRN>$</b> <b class=HIY>ln</b> <b class=HIK>-s</b> python3.10/ python3.11 
-(pyJupyterLab) $ ll+(pyJupyterLab) <b class=GRN>$</b> <b class=HIY>ll</b>
 </pre></html></WRAP> </pre></html></WRAP>
 <WRAP color_result><html><pre> <WRAP color_result><html><pre>
行 133: 行 182:
 </pre></html></WRAP> </pre></html></WRAP>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-(pyJupyterLab) $ pip freeze+(pyJupyterLab) <b class=GRN>$</b> <b class=HIY>pip</b> freeze
 </pre></html></WRAP> </pre></html></WRAP>
 <WRAP color_result><html><pre> <WRAP color_result><html><pre>
  • python/venv.txt
  • 最終更新: 2023/03/08 19:50
  • by ともやん