{article Examples__Python 3.4 }{title} {text} {/article}

Virtual Environments

Basic Usage

Working in cmd.exe

Create a virtual environment test1:

type virtualenv test1

C:\Python34\Lib\site-packages\virtualenv-1.11.6>virtualenv test1

{source}
<!-- You can place html anywhere within the source tags -->
<pre class="brush:py;">

C:\Python34\Lib\site-packages\virtualenv-1.11.6>virtualenv test1
Using base prefix 'C:\\Python34'
New python executable in test1\Scripts\python.EXE
Installing setuptools, pip...done.

</pre>

<script language="javascript" type="text/javascript">
    // You can place JavaScript like this

</script>
<?php
    // You can place PHP like this

?>
{/source}

Starting the virtual environment test1, it needs to be activated:

Change to dir:

C:\Python34\Lib\site-packages\virtualenv-1.11.6\test1\Scripts>

type activate.bat or (activate)

{source}
<!-- You can place html anywhere within the source tags -->
<pre class="brush:py;">

C:\Python34\Lib\site-packages\virtualenv-1.11.6\test1\Scripts>activate.bat
(test1) C:\Python34\Lib\site-packages\virtualenv-1.11.6\test1\Scripts>


</pre>

<script language="javascript" type="text/javascript">
    // You can place JavaScript like this

</script>
<?php
    // You can place PHP like this

?>
{/source}