docs use venv instead of virtualenv
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by darless · committed by David Lord · parent 8ee2f2e · Browse files · 2 files·+10 added−29 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+10 added−29 removed
- other:+10 added−29 removed
Provenance
- Commit
d2145fd- Tree
6e47f51- Author
darless <3382617+darless@users.noreply.github.com>- Committer
David Lord <davidism@gmail.com>- Parent
8ee2f2e
2 files changed+10 added−29 removed
modified:docs/quickstart.rst+8 added-27 removed
27 unmodified lines28 29 Virtualenv to the rescue! Virtualenv enables multiple side-by-side30 installations of Python, one for each project. It doesn't actually31 install separate copies of Python, but it does provide a clever way to32-keep different project environments isolated. Let's see how virtualenv33-works.32+keep different project environments isolated.33 35-If you are on Mac OS X or Linux::34+Create your project folder, then a virtualenv within it::35 37- $ pip install virtualenv --user38-39-One of these will probably install virtualenv on your system. Maybe it's even40-in your package manager. If you use Ubuntu, try::41-42- $ sudo apt-get install python-virtualenv43-44-If you are on Windows (or none of the above methods worked) you must install45-``pip`` first. For more information about this, see `installing pip`_.46-Once you have it installed, run the ``pip`` command from above, but without47-the `sudo` prefix.48-49-.. _installing pip: https://pip.readthedocs.io/en/latest/installing/50-51-Once you have virtualenv installed, just fire up a shell and create52-your own environment. I usually create a project folder and a `venv`53-folder within::54-36 $ mkdir myproject37 $ cd myproject57- $ virtualenv venv58- New python executable in venv/bin/python59- Installing setuptools, pip............done.38+ $ python3 -m venv .venv39 40 Now, whenever you want to work on a project, you only have to activate the41 corresponding environment. On OS X and Linux, do the following::42 64- $ . venv/bin/activate43+ $ . .venv/bin/activate44+ (venv) $45 46 If you are a Windows user, the following command is for you::47 68- $ venv\scripts\activate48+ > .venv\scripts\activate49+ (venv) >50 51 Either way, you should now be using your virtualenv (notice how the prompt of52 your shell has changed to show the active environment).53 73-And if you want to go back to the real world, use the following command::54+And if you want to stop using the virtualenv, use the following command::55 56 $ deactivate57 58 After doing this, the prompt of your shell should be as familiar as before.222 unmodified linesmodified:docs/setuptools.rst+2 added-2 removed
95 unmodified lines96 package:97 98 .. code-block:: console99 100- $ virtualenv venv101- $ . venv/bin/activate100+ $ python3 -m venv .venv101+ $ . .venv/bin/activate102 $ pip install --editable .103 104 Afterwards, your command should be available:105 48 unmodified lines