{article Examples__Python 3.4 }{title} {text} {/article}
pip install
pip is run from the command line, not the Python interpreter. RUN AS ADMINISTRATOR
Example from Django Essentials
To install Django with PIP, you have to open a command prompt and go to the
Scripts
directory that you can find in thePython
folder. You can install Django with the following command:
C:\Python33\Scripts\pip.exe install django
{source}
<!-- You can place html anywhere within the source tags -->
<pre class="brush:py;">
PS C:\python34\scripts> pip.exe install django
Downloading/unpacking django
Installing collected packages: django
Successfully installed django
Cleaning up...
PS C:\python34\scripts>
</pre>
<script language="javascript" type="text/javascript">
// You can place JavaScript like this
</script>
<?php
// You can place PHP like this
?>
{/source}
It is a program that installs modules, so you can use them from Python. Once you have installed the module, then you can open the Python shell and do import module name
.
The Python shell is not a command line, it is an interactive interpreter. You type Python code into it, not commands
{source}
<!-- You can place html anywhere within the source tags -->
<pre class="brush:py;">
Windows PowerShell
Copyright (C) 2012 Microsoft Corporation. All rights reserved.
PS C:\Users\Tom> cd /
PS C:\> cd python34
PS C:\python34> pip install wheel
Downloading/unpacking wheel
Installing collected packages: wheel
Successfully installed wheel
Cleaning up...
PS C:\python34>
</pre>
pip Upgrade </br>
python -m pip install -U pip
<pre class="brush:py;">
Windows PowerShell
Copyright (C) 2012 Microsoft Corporation. All rights reserved.
PS C:\Users\Tom> cd /python34
PS C:\python34> python -m pip install -U pip
Requirement already up-to-date: pip in c:\python34\lib\site-packages
Cleaning up...
PS C:\python34>
</pre>
<script language="javascript" type="text/javascript">
// You can place JavaScript like this
</script>
<?php
// You can place PHP like this
?>
{/source}