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 3.8 runtime environment.
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
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
.profilefile to complete the installation and configuration.
state activate ActiveState/ActivePython-3.8. 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 install ActivePython by downloading the release tarball, the installer archive file with a
tar.gz extension, extracting the files, and running the installation script.
To download and install ActivePython:
- Navigate to the ActivePython 3.8 project page on the ActiveState Platform: https://platform.activestate.com/ActiveState/ActivePython-3.8.
Click the Download Builds tab.
You must sign in to the Platform to download builds. Enter your username and password, click Sign in with Github to us your GitHub credentials, or click Create an Account to set up a new free account.
Click the Download .tar.gz button.
Open a command prompt on your computer and navigate to the download directory.
Extract the installation files from the tarball:
tar xzf ActivePython-<build_information>.tar.gz.
Note: the filename will be similar to the following:
ActivePython-3.8.1.0000-linux-x86_64-glibc-2.17-07ca90fa.tar.gz. It is made up of the Python version number, the Activestate version number, platform information, and a unique identifier. You can enter the first few characters of the filename and press tab instead of typing out the whole filename.
Navigate to the extracted directory, which is the downloaded filename minus
tar.gz. For example:
You can enter the first few characters and press tab instead of typing out the whole filename.
./install.shto run the installation script.
Note: You must have write access to the directory you are installing ActivePython into. In particular, if you want to the default installation location (
/opt/ActivePython-3.8) you must run the installer with a user that has write privileges to this folder. One option is to use sudo to run the installer:
The installer prompts you to choose to rewrite sehbang lines of scripts to use
/usr/bin/env. This is important if you need your installation to be relocatable, but otherwise you can accept the default option
Installing in the default folder without rewriting scripts.
$ tar -xzf ActivePython-3.8.2.0000-linux-x86_64-glibc-2.17-07ca90fa.tar.gz $ cd ActivePython-3.8.2.0000-linux-x86_64-glibc-2.17-07ca90fa/ $ sudo ./install.sh Enter directory in which to install ActivePython. Leave blank and press 'Enter' to use the default [/opt/ActivePython-3.8]. Install directory: Do you want to rewrite the shebang lines of scripts to use /usr/bin/env? [y/N] Installing ActivePython to '/opt/ActivePython-3.8'... Relocating dir-dependent files...
Optional. If you installed ActivePython in a directory that is not already on your PATH, you can add the bin directory to your PATH environment variable for quicker access. For example, if you installed ActivePython in
~/AP38 you need to update your.bashrc
configuration file (or equivalent depending on the shell you are using) with the new path. For example:export PATH=~/AP38/bin:~/AP38/Tools:~/AP38/ninja:$PATH`
If you are running a Linux distribution other than CentOS, you need to set your system’s OPENSSLDIR environment variable to you system’s default OPENSSL certificate directory. For example, add
export OPENSSLDIR=/usr/lib/sslto your .bashrc (or equivalent) configuration file.
By default the install script will prompt you for an install directory.
You can avoid this interaction by specifying the install directory with
-I <installdir> option. Enter
./install.sh -h option for full usage information.
$ tar -xzf ActivePython-3.8.2.0000-linux-x86_64-glibc-2.17-07ca90fa.tar.gz $ cd ActivePython-3.8.2.0000-linux-x86_64-glibc-2.17-07ca90fa/ $ ./install.sh -I ~/APY38
Remove the directory where you installed ActivePython. If you configured the PATH environment variable during installation, update your configuration files to no longer reference the ActivePython configuration directories.