Python

From UMIACS
Revision as of 16:35, 7 July 2014 by Sabobbin (talk | contribs) (Created page with "Python is a widely used general-purpose, high-level programming language. == Getting Started == === Python Versions === Most modern *NIX systems ship with a default version o...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Python is a widely used general-purpose, high-level programming language.

Getting Started

Python Versions

Most modern *NIX systems ship with a default version of Python. If the default version is not sufficient, there are multiple version of Python are available via GNU Modules. If you find that you need a version of Python that is not currently available through GNU Modules, you can always build it from source.

Python Environment

Information about PYTHONPATH

Installing Modules

While some of the Versions of Python available in GNU modules provide a default set of modules pre-installed, you may wish to install your own. Typically you will not have access to the global Python install location, so you will have to install modules using an alternative method.

Unix/Linux Alternate Module Installation

'User' scheme

The user scheme will install the module into the site userbase (python -c 'import site; print site.USER_BASE'). This file location is included in the PYTHONPATH by default.

bash:~$ python setup.py install --user
'Prefix' scheme

The prefix scheme will install the module into a location specified by the user. This location will need to be added to the PYTHONPATH in order for the module to be found by python.

bash:~$ python setup.py install --prefix="/path/to/location"
Python Virtual Environment

Virtual environments are cool, use them.

Windows Alternate Module Installation:

Prefix Scheme=

Python on windows has a simpler layout, and as such the prefix scheme has traditionally been used to install additional packages intoa separate location.

python setup.py install --prefix="\Temp\Python"