Installing ActivePython for Windows

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.7 runtime environment.

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

    IEX(New-Object Net.WebClient).downloadString('https://platform.activestate.com/dl/cli/install.ps1')
    
  2. Open the command prompt (cmd.exe) and run state activate ActiveState/ActivePython-3.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.

For information on installing and working with the State Tool, see the State Tool section in the ActiveState Platform documentation.

Installing ActivePython using the Windows installer

You can install ActivePython by downloading and running the Setup Wizard. For more complex installations you can run the Setup Wizard on the command line.

Prerequisites

  • Windows 64-bit (amd64); Windows 7, or later
  • The installation requires at least 1 GB of hard drive space

Before you begin

  • Other Python 3.7 Installations: ActivePython 3.7 cannot coexist with other Python 3.7 installations on Windows. You must uninstall any other Python 3.7 installations, such as a Python 3.7 build from python.org, before installing ActivePython 3.7.
  • Directory name: You should install ActivePython in a directory that does not contain spaces in the name. Spaces can causes problems on some versions of Windows with certain service pack levels. By default the Setup Wizard installs ActivePython in a directory without spaces.
  • Directory contents: If you are installing ActivePython to an existing directory, the ActivePython setup wizard may overwrite files in that directory. We recommend that you install ActivePython in a new or empty directory.

If you have problems importing certain modules after installation, please verify that your system meets the criteria listed above before submitting a bug report.

If you want to run Jupyter Notebook on Windows, you must install the pywinpty package after you complete the ActivePython installation. For more information, see Jupyter Notebook.

Using the ActivePython Setup Wizard

There are two ways to install ActivePython with the setup wizard:

  1. You can run the setup wizard and enter the required information to install the software.
  2. If you want to automate the installation, you can run the setup wizard from the command line.

Running the ActivePython Setup Wizard

When you install ActivePython, you should run the setup wizard as an Administrator.

Note: If you do not have Administrator rights on the computer, you can use the generic ActiveState Package Installer to complete the installation.

  1. Navigate to the ActivePython 3.7.4 project page on the ActiveState Platform: https://platform.activestate.com/ActiveState/ActivePython-3.7
  2. 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. 3. Right-click the installation file (.exe or .msi) and select Run As Administrator. 4. Follow the prompts on screen to complete the installation.

Running the installation as an Administrator allows other users on the computer to use ActivePython, and ensures that all of ActivePython’s features function correctly.

Installing ActivePython without administrative privileges has the following limitations:

  • The Python ActiveX scripting engine feature will be unavailable.
  • 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.

See the Getting started with ActivePython on Windows for a general introduction to ActivePython on your platform, and pointers to documentation that will be most useful to you.

Running the ActivePython Setup Wizard on the command line

You can install ActivePython from the command line. You should start the command prompt as an Administrator to ensure the the installation can complete successfully. ActivePython’s installer uses Windows Installer technology, which allows you to partially control the install from the command line.

Starting the Setup Wizard

You can start the Setup Wizard from the command line, and walk through the installation steps in the user interface.

Community edition (.exe):

c:> ActivePython-<version>.exe

Commercial editions (.msi):

c:> msiexec /i ActivePython-<version>.msi

Logging the Setup Wizard output

If you want to enable logging you can add the appropriate command line switches to specify the level of logging and the log file location. The following command will generate a log of the install in “install.log” in the current directory.

Community edition (.exe):

c:> ActivePython-<version>.exe /L*v ./install.log

Commercial editions (.msi):

c:> msiexec /i ActivePython-<version>.msi /L*v ./install.log

Specifying a custom installation directory

You can also specify a custom installation directory instead of using the default.

c:> msiexec /i ActivePython-<version>.msi APPDIR=C:\apps\Python

Complete installation example

You can combine command line options to complete your custom installation from the command line. For example, the following command will install just the ActivePython core and documentation to C:\apps\Python.

Community edition (.exe):

c:\> ActivePython-<version>.exe /qn+ APPDIR="C:\apps\Python" ^
     /L*v ./install.log

Commercial editions (.msi):

c:\> msiexec /i ActivePython-<version>.msi /passive APPDIR="C:\apps\python" ^
     /L*v ./install.log

For more information about the command line installation options, contact support@activestate.com

Uninstalling ActivePython

The ActivePython for Windows can be uninstalled using the Modify, Repair or Uninstall ActivePython shortcut in the ActiveState ActivePython 3.7 program group in the Windows Start menu, or you can use Add/Remove Programs in the Control Panel.

Alternatively, you use the setup wizard to uninstall ActivePython on the command line and write the progress to a log file:

Community edition (.exe):

c:\> ActivePython-<version>.exe /x // /L*v ./uninstall.log

Commercial editions (.msi):

c:\> msiexec ActivePython-<version>.msi /x /L*v ./uninstall.log

ActiveState package installer

You can use the ActiveState package installer it to install ActivePython if you do not have Administrator rights on Windows.

  • Download the package to a temporary directory, extract the files, and run the install.bat script.

The AS package is delivered as a zip file, (.zip).

Interactive Install

To install interactively, simple run the install script without arguments. The install script will prompt your for an installation directory.

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.

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.