Python-2.7.5
Installation of Python 2
Install Python 2 by running the
following commands:
./configure --prefix=/usr \
--enable-shared \
--with-system-expat \
--with-system-ffi \
--enable-unicode=ucs4 &&
make
To test the results, issue: make
test.
Now, as the root
user:
make install &&
chmod -v 755 /usr/lib/libpython2.7.so.1.0
If you have downloaded the preformatted documentation from
http://docs.python.org/download.html,
install it as the root
user:
install -v -dm755 /usr/share/doc/python-2.7.5 &&
tar --strip-components=1 -C /usr/share/doc/python-2.7.5 \
-xvf ../python-2.7.5-docs-html.tar.bz2 &&
find /usr/share/doc/python-2.7.5 -type d -exec chmod 0755 {} \; &&
find /usr/share/doc/python-2.7.5 -type f -exec chmod 0644 {} \;
Command Explanations
--with-system-expat
: This switch
enables linking against system version of Expat. Remove if you have not installed
expat-2.1.0.
--with-system-ffi
: This switch enables
linking against system version of libffi. Remove if you have not installed
libffi-3.0.13.
--enable-unicode=ucs4
: This
switch enables 32bit Unicode support in Python.
--with-dbmliborder=bdb:gdbm:ndbm
: Use
this switch if you want to build Python DBM Module against Berkeley DB instead of GDBM.
chmod ...: Fix
permissions for libraries to be consistent with other libraries.
Configuring Python 2
In order for python
to find the installed documentation, you must add the following
environment variable to individual user's or the system's profile:
export PYTHONDOCS=/usr/share/doc/python-2.7.5
Contents
Installed Programs:
2to3, pydoc, python, python-config,
python2, python2-config, python2.7, python2.7-config, smtpd.py,
and optionally if Tk is
installed, idle
Installed Library:
libpython2.7.so
Installed Directories:
/usr/include/python2.7,
/usr/lib/python2.7, and /usr/share/doc/python-2.7.5
Short Descriptions
2to3
|
is a Python program that
reads Python 2.x source
code and applies a series of fixers to transform it into
valid Python 3.x code.
|
idle
|
is a wrapper script that opens a Python aware GUI editor.
|
pydoc
|
is the Python
documentation tool.
|
python
|
is an interpreted, interactive, object-oriented
programming language.
|
python2.7
|
is a version-specific name for the python program.
|
smtpd.py
|
is an SMTP proxy implemented in Python.
|
Last updated on 2013-08-17 21:37:04 -0700