Installing Python

Instrument
DCA-X
N109x
UXR Scope
Flex Apps:
FlexDCA
FlexRT
Python

Use the following steps to install Python 2.7 on your PC or 86100D and to confirm that Python is correctly installed. You cannot use Python 3.x versions.

  1. Install Python 2.7 on the 86100D or PC where FlexDCA is running. The Anaconda distribution of Python that is downloaded from CONTINUUM Analytics is recommended. If you use another distribution or a different editor, you may need to perform different and additional setup steps.
  2. The version of Python supported for user operators is Python 2.7. Python 3.x is not supported.

  3. Modify the PC's System PATH environment variable to include the path to the Python 2.7 executable. On the PC's Start menu:
    1. Click Computer, System properties, Advanced System Settings.
    2. In the Advanced tab, select Environment Variables and edit the Path under System variables. The string that you add to the PATH variable should look similar to C:\Anaconda on a PC. On a DCA-X, it should look similar to C:\Users\dca-admin\Anaconda

    Use caution when editing the PATH variable. If you are not experienced in editing this variable, ask a computer expert for help.

    If you install both Python 2.7 and 3.4 and set up an environment to switch between 2.7 and 3.4 using Anaconda's Launcher application, you must still add Python 2.7 to you PC's PATH environment variable. For example, the string that you add may look similar to C:\Anaconda3\envs\Python27.

  4. It the Window's Start menu, type cmd and press the Enter key.
  5. In the cmd window, enter python and press return. As shown below, you should see a confirmation that Python 2.7 is installed. Enter quit() and then enter path and confirm that the PATH environment variable is properly set. Close the cmd window.
  6. Using Anaconda's Launcher application, start the script editor, Spyder. In Spyder, enter the following two lines of code. If the script runs without warnings or errors, your environment should be properly configured. This script includes a NumPy import statement. The NumPy library is automatically installed with the Anaconda distribution. NumPy is used by FlexDCA to provide input variables to your script, so even if you don't import NumPy into your scripts you must still have NumPy installed with Python.
  7. import numpy
    print "This is a test!"

    Be aware that if you use a Python editor that was not installed with your Python download, you must configure the editor to work with the Anaconda or other distribution.

  8. Click in the IPython console which should be visible in Spyder. This selects the console for output.
  9. In Spyder's menu, click Run > Run to run the script. If "This is a test!" is printed on the IPython console and no errors concerning numpy are reported, you Python environment should be correctly installed and ready to use.
  10. Now that your Python editor works correctly, try "Lesson 1. Hello World!" to quickly run and test your first user measurement.