Python 3 Environnement

In its recent versions, C2A makes use of the Python 3 environment to implement some functions. This means that Python 3 must be installed on your computer in order for these functions to be usable. The C2A functions that require Python 3 are the following:

In order to use the Python 3 interface, you must first install Python 3 on your system (see below) then activate the Python 3 interface within C2A. In order to do that, go into the Options dialog box, then in the Misc tab, click the button System... and finally check the option Enable Python 3 interface. If Python 3 is not installed on your computer, and if you use one of these functions, an error message is displayed except for the planet elongation calculation (in which case the elongation is simply not provided).

Installating the Python 3 environment

The install of Python 3 can easily be done by downloading the latest version from https://www.python.org/downloads/. Use version Python 3.6.2 or newer. Take care to install preferably the 64-bit version of Python 3 if your Windows version is itself a 64-bit version. Python 3 install process is simple and you just have to follow the different steps of the install assistant.

Caution! Make sure you check the option Add Python 3.6 to PATH in the first screen of the install assistant. This is required so that C2A is able to access the Python environment. Furthermore, it is preferable to check the option Install launcher for all users.

In addition to the Python 3 environment, you must install 3 optional packages which are required by C2A. These are the packages NumPy, Matplotlib and PyEphem. These packages can be obtained from the page Unofficial Windows Binaries for Python Extension Packages at the address http://www.lfd.uci.edu/~gohlke/pythonlibs/. Look for each of the 3 packages in this page (you can do a search with the keyboard shortcut Ctrl+F). Select the package version that matches you version of Python 3 and the type of Windows system you are using (32 or 64 bits). Here are for example the names of the packages for a Python 3.6 environment:

NumPy
numpy-1.13.1+mkl-cp36-cp36m-win32.whl
numpy-1.13.1+mkl-cp36-cp36m-win_amd64.whl

Matplotlib
matplotlib-2.0.2-cp36-cp36m-win32.whl
matplotlib-2.0.2-cp36-cp36m-win_amd64.whl

PyEphem
ephem-3.7.6.0-cp36-cp36m-win32.whl
ephem-3.7.6.0-cp36-cp36m-win_amd64.whl

Once the 3 WHL files have been downloaded, the install can be done as follows:

Testing the Pyhton 3 environment

To check that Python 3 and the three packages NumPy, Matplolib and PyEphem have been correctly installed, proceed as follows:

import numpy as np
import matplotlib.pyplot as plt
import ephem

You should not get any error message if the Python packages have been correctly installed.

Table of Contents