forked from pallets/click
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge stable into main (pallets#2799)
Most changes are to documentation.
- Loading branch information
Showing
15 changed files
with
214 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,8 @@ usage patterns. | |
why | ||
quickstart | ||
entry-points | ||
virtualenv | ||
setuptools | ||
parameters | ||
options | ||
arguments | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
.. _virtualenv-heading: | ||
|
||
Virtualenv | ||
========================= | ||
|
||
Why Use Virtualenv? | ||
------------------------- | ||
|
||
You should use `Virtualenv <https://virtualenv.pypa.io/en/latest/>`_ because: | ||
|
||
* It allows you to install multiple versions of the same dependency. | ||
|
||
* If you have an operating system version of Python, it prevents you from changing its dependencies and potentially messing up your os. | ||
|
||
How to Use Virtualenv | ||
----------------------------- | ||
|
||
Create your project folder, then a virtualenv within it:: | ||
|
||
$ mkdir myproject | ||
$ cd myproject | ||
$ python3 -m venv .venv | ||
|
||
Now, whenever you want to work on a project, you only have to activate the | ||
corresponding environment. | ||
|
||
.. tabs:: | ||
|
||
.. group-tab:: OSX/Linux | ||
|
||
.. code-block:: text | ||
$ . .venv/bin/activate | ||
(venv) $ | ||
.. group-tab:: Windows | ||
|
||
.. code-block:: text | ||
> .venv\scripts\activate | ||
(venv) > | ||
You are now using your virtualenv (notice how the prompt of your shell has changed to show the active environment). | ||
|
||
To install packages in the virtual environment:: | ||
|
||
$ pip install click | ||
|
||
And if you want to stop using the virtualenv, use the following command:: | ||
|
||
$ deactivate | ||
|
||
After doing this, the prompt of your shell should be as familiar as before. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.