Skip to content

Commit 0b6cca4

Browse files
reuventheacodes
authored andcommitted
Explained that Windows users don't need to say "source" (#493)
Elaborated on the reason for using "source" under Unix, and why it doesn't affect Unix. Also changed the Python version referenced for site-packages from 2.7 to 3.6.
1 parent b04dcbb commit 0b6cca4

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎source/tutorials/installing-packages.rst‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ rather than being installed globally.
159159

160160
Imagine you have an application that needs version 1 of LibFoo, but another
161161
application requires version 2. How can you use both these applications? If you
162-
install everything into /usr/lib/python2.7/site-packages (or whatever your
162+
install everything into /usr/lib/python3.6/site-packages (or whatever your
163163
platform’s standard location is), it’s easy to end up in a situation where you
164164
unintentionally upgrade an application that shouldn’t be upgraded.
165165

@@ -205,6 +205,13 @@ Using `venv`_:
205205
For more information, see the `virtualenv <http://virtualenv.pypa.io>`_ docs or
206206
the `venv`_ docs.
207207

208+
In both of the above cases, Windows users should _not_ use the
209+
`source` command, but should rather run the `activate` script directly
210+
from the command shell. The use of `source` under Unix shells ensures
211+
that the virtual environment's variables are set within the current
212+
shell, and not in a subprocess (which then disappears, having no
213+
useful effect).
214+
208215
Managing multiple virtual environments directly can become tedious, so the
209216
:ref:`dependency management tutorial <managing-dependencies>` introduces a
210217
higher level tool, :ref:`Pipenv`, that automatically manages a separate

0 commit comments

Comments
 (0)