PyRWI Installation

Programs you need

NI DAQmx

Actually you only need a small part of NI DAQmx (The ANSI C NI-DAQmx library Description). It is good to get this downloading first, because even though you only need a few parts you have to download everything and that makes for a pretty large download.

How to install:

Python

Description

How to install:

  1. Download the latest Python installer: http://www.python.org/download/
    • NOTE: As of 7/11/09 Python 2.6 is the latest version supported by all the math libraries used here. So don't download a newer version, unless you know all the libraries will support it.
  2. Install Python
  3. We would recommend installing Python to its default path rather than forcing it some place else.
  4. Add Python to your search path
    1. Right click on My Computer and choose Properties
    2. Choose the Advanced tab and click Environment Variables
    3. Under System Variables, find "Path"
    4. Click edit
    5. Add ";C:\Python26" to the end of the Value list (You will need to adjust this for wherever you installed Python)
    6. Click all the "Okay" buttons to close everything

Geany - Recommended

Description: My current editor of choice. It is super lightweight (launches fast, doesn't take a lot of memory), but seems to have the key features we want (Code navigator, Program execution, Regular Expression based search and replace, etc.).

How to install:

Numpy, SciPy, & PyLab

Descriptions: Numpy, SciPy, PyLab

How to install:

  1. NOTE: Make sure the installer you download matches the version of Python that you selected above.
  2. Download the installers
  3. Run the NumPy installer first
  4. Then run the SciPy installer
  5. Test the install
  6. Run some example code: http://matplotlib.sourceforge.net/examples/pylab_examples/

pyFLTK

Description

How to install:

  1. Download Windows installer from here: http://sourceforge.net/project/showfiles.php?group_id=14072&package_id=11676
    • The installer is named something like pyFltk-X.X.X.win32-pyY.Y.exe
  2. Run installer
  3. Run some demos: C:\Python26\Lib\site-packages\fltk\test
    • The path may be different if you installed Python somewhere else or a different version of Python.

IPython - Recommended

Description: IPython is a terminal that makes writing and testing Python code interactively very easy. IPython also integrates well with PyLab. IPython offers many features and extensions over the IDLE terminal.

How to install:

  1. Download latest installer from: http://ipython.scipy.org/moin/Download
  2. Run installer
  3. On windows, IPython needs PyReadline
  4. Run IPython with PyLab support and test with these commands:
    In [1]: x = arange(0,2*pi,pi/100)
    In [2]: y = sin(x)
    In [3]: plot(x,y)
    In [4]: exit()

PyRWI

Description: PyRWI is made of two Python packages: PyRWI proper (GUI widgets and DAQ helpers) and nidaqmx (Python wrapper to the ANSI C DAQmx library)

How to install:

  1. Download the latest code using SVN from our repository.
  2. The PyRWI project is in its early stages, so there isn't an installer.
    • The code has an install.txt in the root folder. Follow the instructions in this file to compile and install PyRWI.
    • If you are willing to help setup a distutils installer, please contact us ().
  3. You can test the installation by starting IPython or IDLE and typing:
    import nidaqmx as DAQmx
    import pyrwi
    • If they import without error, you are all set.

MingW

Description: MingW provides the GCC compiler and necessary support tools to allow compiling of C or C++ programs on Windows. All Windows C libraries used by PyRWI are build with MingW.

How to install:

MSYS

Description: MSYS provides a BASH shell and related *nix based command line development tools. MSYS is designed to integrate with support MingW. We use MSYS for two reasons, first it enables many programming solutions & tools common on *nix environments to be used directly in Windows, second it provides a familiar interface to those who are accustom to *nix development.

How to install:

  1. The official install instructions are: http://www.mingw.org/wiki/MSYS
  2. Get MSYS-1.X.X.exe from http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=24963
    • We chose the minimal install
  3. You should follow the official instructions down through installing msysDTK-X.X.X.exe
    • The MSYS Core 1.0.11 does not seem to be necessary. I think MSYS-1.X.X.exe includes it.
  4. Optionally you can also install vim from: http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=67879
    • vim-7.1-MSYS-1.0.11-1-bin.tar.gz
    • To install vim: untar the file in C:\msys\1.0
  5. Tips
    • MSYS always starts in your "home" directory, which is usually something like C:\msys\1.0\home\USERNAME
    • MSYS uses unix style paths and maps your C drive to /c so your My Documents folder is at /c/Documents\ and\ Settings/USERNAME/My\ Documents/ in MSYS
    • There are more tips here
  6. To test the install:
    1. Make a file named hello.c that contains:
      #include <stdio.h>
      int main() {
      printf("Hello World");
      return 0;
      }
    2. Compile the program in MSYS by typing: gcc -Wall hello.c -o hello.exe
    3. Run the program in MSYS by typing: ./hello.exe

SWIG

Description: SWIG is a tool for making C/C++ libraries accessible in scripting languages. We use SWIG to make the nidaqmx Python module.

How to install:

  1. Download the Windows version (swigwin) from http://www.swig.org/survey.html
  2. The zip contains a pre-compiled version of swig.
    • The trick is to find somewhere to install it.
    • You could use the ./config; make; make install method, but that requires g++ (from the full install of MingW) and maybe other stuff.
    • We will give our solution here
  3. Extract the zip file and rename the resulting director to "swigwin"
  4. Copy that directory to "C:\msys\1.0\home\USERNAME"
  5. Now you can access swig from MSYS using something like this ~/swigwin/swig.exe -python example.i