|
ActivePython User Guide |
|
You are here: ActivePython User Guide » Installation Guide
ActivePython 2.5 Installation Guide
Table of Contents
Windows: Installing the MSI
- Windows Installer Engine (MSI) Windows 9x and NT users
must have the Microsoft Windows Installer engine installed on their system.
(Note: Windows NT users must be logged in as an administrator
in order to install the MSI engine.) The MSI engine package can be downloaded
from:
Directory Name It is recommended that you do not install
ActivePython to a directory that contains spaces in the name. This causes
problems on some variants of Windows with some service pack levels. By default
ActivePython installs to a directory without spaces.
Directory Contents If you are installing ActivePython to
an existing directory, ActivePython's setup may overwrite files in that
directory. We recommend that you install ActivePython to a new or empty
directory.
Other Python 2.5 Installations On Windows,
ActivePython 2.5 cannot coexist with other Python
2.5 installations (for example, a Python 2.5
build from python.org). Uninstall any other Python 2.5
installations before installing ActivePython 2.5.
If you have problems importing certain modules after installation, please
check these things before submitting a bug report.
To install ActivePython, download the .msi installation package and run it
by double-clicking it. Follow the prompts.
It is recommended that you run the ActivePython installation file
from an account with administrative privileges. This will allow other users
to use ActivePython, and will ensure that all of ActivePython's features
function. Installing ActivePython without administrative privileges has the
following limitations:
- The Python ActiveX scripting engine feature will be unavailable.
- Windows NT/2000 users will not be able to write Services.
- Environment variables cannot be set (e.g. PATH, PATHEXT).
- File associations for Python files cannot be set.
- Any registry entries created are under
HKEY_CURRENT_USER and
not under HKEY_LOCAL_MACHINE.
You might like to read the Getting Started
page in this guide for a general introduction to ActivePython on your
platform, and pointers to documentation that will be most useful to you.
You can install the ActivePython MSI from the command line. For example:
c:\> msiexec.exe /i ActivePython-<version>.msi
ActivePython's installer uses Windows Installer technology. This allows
you to partially control the install from the command line. For example:
-
You can have the ActivePython installer run with a reduced user interface.
For example, the following will install silently and only pop up a dialog when
the installation is complete.
c:\> msiexec.exe /i ActivePython-<version>.msi /qn+
The following will install with no user interface at all.
c:\> msiexec.exe /i ActivePython-<version>.msi /q
-
You can generate a log of the ActivePython installation with the following
command. The following command will generate a log of the install in
"install.log".
c:\> msiexec.exe /i ActivePython-<version>.msi /L*v install.log
-
Command line options can be used to configure ActivePython installation
properties. For example, the following will install ActivePython to
"D:\myapps\Python", instead of the default:
c:\> msiexec.exe /i ActivePython-<version>.msi INSTALLDIR=D:\myapps\Python
-
ActivePython is divided into a number of distinct features. In the
"Customize Setup" dialog you can select which features to install. You can
also do this on the command line with the ADDLOCAL property. For example, the
following command will install just the core ActivePython functionality (i.e.
not the PyWin32 extensions or the documentation.
c:\> msiexec.exe /i ActivePython-<version>.msi ADDLOCAL=core
The current set of ActivePython features are
core ActivePython core (must be installed)
pywin32 PyWin32 extensions
doc Documentation
register Register this as the default Python installation
where the hierarchy denotes dependencies, I.e. to install
pywin32 you must install the core.
-
These command line options can all be brought together. For example, the
following command will silently install just the ActivePython core and
documentation to "C:\myapps\Python" and will not register this
as the default Python installation.
c:\> msiexec /i ActivePython-<version>.msi /qn+ INSTALLDIR=C:\myapps\Python ADDLOCAL=core,doc
Uninstalling the MSI
The ActivePython for Windows can be uninstalled using the Modify, Repair
or Uninstall ActivePython shortcut in the ActiveState ActivePython
2.5 program group in the Windows Start menu. Alternatively,
you may uninstall the ActivePython MSI from Add/Remove
Programs in the Control Panel.
Mac OS X: Installing the OS X Package
ActivePython is distributed on Mac OS X as a disk image (.dmg
file). The disk image contains an installer package (.pkg bundle)
that you run to install ActivePython.
Other Python Distributions
Both ActivePython and MacPython (another Python distribution for Mac OS X)
install to the same location on disk
(/Library/Frameworks/Python.framework/... with some links in
/usr/local/bin), therefore ActivePython and MacPython
installations of the same versions can collide. The ActivePython installer will
properly install over a MacPython installation of the same version. However it
is recommended that you first uninstall MacPython 2.5 before
installing ActivePython 2.5. For more details, consult the
ActivePython FAQ in this guide.
Prerequisites
- Hardware: 65 MD hard disk space
- Operating System: Mac OS X 10.3.9 (Panther) or later
Installing the OS X Package (GUI)
To install ActivePython:
- Download
the ActivePython disk image
(
ActivePython-<version>-macosx.dmg).
- If the browser does not automatically mount the disk image and open the
mounted folder in Finder, double-click
ActivePython-<version>-macosx.dmg to do
so.
- Double-click the ActivePython installer package
(
ActivePython-2.5.pkg) to start the
installation.
- Follow the Installer prompts. The installer will ask for administrative
authentication if the current user does not have administrative
priviledges.
- After installation is complete, you may eject the ActivePython disk image
and move
ActivePython-<version>-macosx.dmg to
the Trash.
ActivePython installs a python link in
/usr/local/bin. By default this directory is not on your
PATH environment variable. Refer to
Getting Started on Mac OS X in this
guide for instructions on putting python on your path and for a
general introduction to ActivePython on Mac OS X.
Installing the OS X Package Non-Interactively
Mac OS X includes a command-line tool, installer, for
installing OS X packages non-interactively from the command line. This can be
useful for remote administration (e.g. on Apple Xserve hardware). To install
ActivePython non-interactively from the command line:
- Download
the ActivePython disk image
(
ActivePython-<version>-macosx.dmg).
- If the browser does not automatically mount the disk image, mount it
manually with the following command:
hdiutil attach path/to/ActivePython-<version>-macosx.dmg
- Install ActivePython:
installer -pkg /Volumes/ActivePython-2.5/ActivePython-2.5.pkg -target /
Note: It is sometimes useful to create an install log file
(e.g. to send to ActiveState technical support). To do this, use the
-verbose and -dumplog flags:
installer -pkg /Volumes/ActivePython-2.5/ActivePython-2.5.pkg \
-target / -verbose -dumplog > install.log 2>&1
- Unmount the ActivePython disk image:
hdiutil unmount /Volumes/ActivePython-2.5
ActivePython installs a python link in
/usr/local/bin. By default this directory is not on your
PATH environment variable. Refer to
Getting Started on Mac OS X in this
guide for instructions on putting python on your path and for a
general introduction to ActivePython on Mac OS X.
Uninstalling the OS X Package
Apple does not provide a standard uninstallation tool or mechanism. You may,
however, use the uninstall script that comes with ActivePython
to uninstall ActivePython:
sudo python /Library/Receipts/ActivePython-2.5.pkg/Contents/Resources/uninstall
Note: ActivePython's uninstall will restore an
older Python installation in
/Library/Frameworks/Python.framework if one exists. This means,
for example, that if you have ActivePython 2.4 install then install and
uninstall ActivePython 2.5, your original ActivePython 2.4 will be restored
to its full working state.
Installing the Generic ActivePython "AS Package" Installer ( AIX, HP-UX, Linux, Solaris)
The ActivePython "AS package" installer package is a generic
installer for many platforms. It allows you to install ActivePython as a
non-root (non-Administrator) user. To install: Download the package to a
temporary directory, extract the files, and run the
install.sh install script
(install.bat on Windows).
The "AS package" is a standard tarball, *.tar.gz,
for Linux and other Unix-family systems like Solaris and a zip file,
*.zip, for Windows). Note: Solaris users
must use GNU tar to unpack the tarball. The default
/usr/bin/tar that ships with Solaris is insufficient. The GNU tar
source and details are available
here and binary packages
are generally available on
www.sunfreeware.com.
After installing ActivePython, you might like to read the
Getting Started page in this guide for a
general introduction to ActivePython on your platform (in particular, getting
your newly installed python on your path), and pointers to
documentation that will be most useful to you.
To install interactively, simple run the install script without arguments.
The install script will prompt your for an installation directory. On Unix:
% tar xzf ActivePython-version.tar.gz
% cd ActivePython-version
% ./install.sh
or on Windows, unzip ActivePython-version.zip
with WinZip or
equivalent and:
C:\> cd .../ActivePython-version
C:\...\ActivePython-version> install.bat
You can add the bin directory to your PATH environment variable for
quicker access. For example, if you use the Bash shell on Unix, you could
place this in your ~/.bash_profile file (assuming you installed into
/home/guido/ActivePython-2.5):
% export PATH=/home/guido/ActivePython-2.5/bin:$PATH
By default the install script will prompt you for an install directory.
You can avoid this interaction by specifying the install directory with
the -I <installdir> option. Use the -h
option for full usage information.
Uninstalling an "AS Package" installation is as simple as removing the
directory to which you installed, because the ActivePython installation is
fully contained in that install location.
|