13,208
edits
m (→Debian: Update instructions due to the release of stretch (Debian 9)) |
(→Using pip (generic method): No need to add a separate anchor to link to a section. Use <Article>"#"<Section>, like FFGo#Using pip (generic method) instead) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 630: | Line 630: | ||
Just as for the [https://pip.pypa.io/ pip] command explained above, think of <code>/usr/bin/python3.4 -m venv</code> as the name of a program (it just runs the main function of the Python <tt>venv</tt> module). In the above command, you can freely choose the <venv-dir> directory. It is just a directory that is going to contain the newly-created virtual environment once this command returns (therefore, you shouldn't have anything inside it before running the command, otherwise that would be messy). | Just as for the [https://pip.pypa.io/ pip] command explained above, think of <code>/usr/bin/python3.4 -m venv</code> as the name of a program (it just runs the main function of the Python <tt>venv</tt> module). In the above command, you can freely choose the <venv-dir> directory. It is just a directory that is going to contain the newly-created virtual environment once this command returns (therefore, you shouldn't have anything inside it before running the command, otherwise that would be messy). | ||
<p> | <p>Note:</p> | ||
<blockquote> | <blockquote> | ||
<p>Some systems may provide executables named <tt>pyvenv-3.4</tt> or similar. For instance, on Debian, <tt>/usr/bin/pyvenv-3.4</tt> is a “shortcut” for <code>/usr/bin/python3.4 -m venv</code>. Thus, one may type:</p> | |||
<syntaxhighlight lang="shell" enclose="div"> | <syntaxhighlight lang="shell" enclose="div"> | ||
Line 639: | Line 639: | ||
<p>to obtain the same effect as above: creating a virtual environment in <venv-dir> based on the Python interpreter <tt>/usr/bin/python3.4</tt>. Thanks to shell command history, using <code>/usr/bin/python3.4 -m venv</code> is not much of a problem, and since this makes it quite clear which Python interpreter is going to be used, I'll favor this syntax here rather than the shorter syntax based on <tt>pyvenv-3.4</tt>.</p> | <p>to obtain the same effect as above: creating a virtual environment in <venv-dir> based on the Python interpreter <tt>/usr/bin/python3.4</tt>. Thanks to shell command history, using <code>/usr/bin/python3.4 -m venv</code> is not much of a problem, and since this makes it quite clear which Python interpreter is going to be used, I'll favor this syntax here rather than the shorter syntax based on <tt>pyvenv-3.4</tt>.</p> | ||
</blockquote> | </blockquote> | ||