Installing ActivePython for Linux

Installing ActivePython using the State Tool (beta)

The State Tool is the command line interface (CLI) for the ActiveState Platform. You can use it to authenticate with the Platform, and then download and configure your ActivePython 2.7 runtime environment.

  1. If you don’t already have the State Tool installed, open your command prompt and run the following command to set it up:

    sh <(curl -q https://platform.activestate.com/dl/cli/install.sh)
    

    You can specify the directory to install the State Tool into using the -t flag.

    sh <(curl -q https://platform.activestate.com/dl/cli/install.sh) -t ~/bin
    

    Follow the prompts in the command prompt and then open a new command prompt or source your .profile file to complete the installation and configuration.

  2. Run state activate ActiveState/ActivePython-2.7. This command downloads the runtime environment from the ActiveState Platform, configures it, and creates an “activated state”, an isolated environment for you to work in.

Installing ActivePython using the tarball installer

You can use the generic AS Package installer to install ActivePython on Linux, AIX, HP-UX, Solaris systems.

The ActivePython “AS package” installer package is a generic installer for many platforms. It allows you to install ActivePython as without needing to be a root user (non-Administrator).

  • Download the package to a temporary directory, extract the files, and run the install.sh install script. For Unix platforms, glibc-2.3+ is required.

The AS package is a standard tarball (*.tar.gz) for Linux and other Unix-family systems.

Note: Solaris and HP-UX users must use GNU tar to unpack the tarball, as the default tar on those platforms will not work. Binary packages of GNU tar are available here:

After installing ActivePython, 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.

Prerequisite

If you plan on using Numpy or packages that include it as a requirement (Pandas, TensorFlow, etc.), you must ensure that GCC Compiler is installed for your Linux distribution. You can check if it is available by entering gcc --version at the command prompt. If a version higher than 4.0 is returned, the required version is available.

If you need to install GCC on a Centos/RHEL-based system enter the following:

$ sudo yum group install "Development Tools"

If you need to install GCC on a Debian/Ubuntu-based system enter the following:

$ sudo apt update && sudo apt install build-essential

Enter gcc --version to verify that the installation completed successfully.

Interactive Install

To install interactively, run the install script without arguments. The install script will prompt you for an installation directory. On Unix:

% tar xzf ActivePython-<version>.tar.gz
% cd ActivePython-<version>
% ./install.sh

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.7):

% export PATH=/home/guido/ActivePython-2.7/bin:$PATH

Non-interactive install

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 the “AS Package”

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.