Installing 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.
- 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.
- Modify the PC's System PATH environment variable to include the path to the Python 2.7 executable. On the PC's Start menu:
- Click Computer, System properties, Advanced System Settings.
- 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
- It the Window's Start menu, type cmd and press the Enter key.
- 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.
- 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.
- Click in the IPython console which should be visible in Spyder. This selects the console for output.
- 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.
- Now that your Python editor works correctly, try "Lesson 1. Hello World!" to quickly run and test your first user measurement.
The version of Python supported for user operators is Python 2.7. Python 3.x is not supported.
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.
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.