change extension to .md
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by denuoweb · committed by denuoweb · parent cb46567 · Browse files · 2 files·+54 added−54 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+54 added−54 removed
- other:+54 added−54 removed
Provenance
- Commit
03e957e- Tree
678dc09- Author
denuoweb <jaron@rosenau.info>- Committer
denuoweb <jaron@rosenau.info>- Parent
cb46567
2 files changed+54 added−54 removed
added:docs/virtualenv.md+54 added
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354.. _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 thecorresponding 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.deleted:docs/virtualenv.rst-54 removed
1-.. _virtualenv-heading:2-3-Virtualenv4-=========================5-6-Why Use Virtualenv?7--------------------------8-9-You should use `Virtualenv <https://virtualenv.pypa.io/en/latest/>`_ because:10-11-* It allows you to install multiple versions of the same dependency.12-13-* If you have an operating system version of Python, it prevents you from changing its dependencies and potentially messing up your os.14-15-How to Use Virtualenv16------------------------------17-18-Create your project folder, then a virtualenv within it::19-20- $ mkdir myproject21- $ cd myproject22- $ python3 -m venv .venv23-24-Now, whenever you want to work on a project, you only have to activate the25-corresponding environment.26-27-.. tabs::28-29- .. group-tab:: OSX/Linux30-31- .. code-block:: text32-33- $ . .venv/bin/activate34- (venv) $35-36- .. group-tab:: Windows37-38- .. code-block:: text39-40- > .venv\scripts\activate41- (venv) >42-43-44-You are now using your virtualenv (notice how the prompt of your shell has changed to show the active environment).45-46-To install packages in the virtual environment::47-48- $ pip install click49-50-And if you want to stop using the virtualenv, use the following command::51-52- $ deactivate53-54-After doing this, the prompt of your shell should be as familiar as before.