pDynamo-1.7.2 Installation on Windows 7

These are updated notes on installing pDynamo-1.7.2 using Cygwin on Windows 7. The MinGW configuration does not work as of 06 May 2012.

These instructions were kindly provided by William E. Wheeler of Omaha, Nebraska. Any enquiries concerning them should be addressed to him.

An alternative to running Cygwin or MinGW within Windows might be using VWWare running Fedora, Ubuntu or other flavor of Linux. In fact, that is now my preferred development system. The MinGW configuration that I had described earlier for pDynamo-1.5 worked very well with IDEs like Aptana Studio, NetBeans and Intellij IDEA. I have tried to get them to work with the Cygwin configuration but early indications are that they don't play well together. If using 'vi' or 'emacs' with Cygwin to write your own programs is acceptable, then by all means, proceed.

As preparation, remove or rename any Windows environment variables that might cause a conflict like a PYTHONPATH variable that has a DOS path or a PATH variable that has a reference to an existing Python or MinGW installation. Run set in a DOS box to easily view the current environment variables that might cause problems.

Cygwin installation:

    • Download setup.exe for version 1.7.14-2 from Cygwin.
    • For the purposes of this document, Cygwin will be installed in a C:\cygwin directory.
    • From the Devel section: gcc
    • From the Editors section: vi
    • From the Libs section: libpopt0
    • From the Python section: python, python-doc, python-feedparser, urlgrabber

I did not need to install numpy, scipy or Pyrex but it won't hurt if you choose to do so. Let the installation add the various dependencies and run to completion. For convenience, I added an icon on the desktop. Double-click the icon to open Cygwin.

    • Using the editor of your choice (vi in my case), add the following lines to the .bash_profile file located in the user's home directory:
export CYGWIN

pDynamo-1.7.2 installation:

    • Download the pdynamo-1.7.2.tar file from the pDynamo web site. I created an /opt directory within the Cygwin directory to hold the pDynamo-1.7.2 directory.
    • Change into the /opt/pDynamo-1.7.2/thirdParty directory and then install Cython and PyYAML.
      • Change into the Cython-0.15.1 directory and install Cython using python install
      • Change into the PyYAML-3.09 directory and install PyYAML using python install
    • Change into the /opt/pDynamo-1.7.2/installation directory. Open a vi session to edit the file and add these lines just under the import statement:
# add this to detect the Windows platform in line 305
import platform

Scroll down to approximately line 300 and add this section:

# . Move the files to the appropriate place.
# wew, provide support for Windows with Cygwin
osname = platform.system().lower()
if osname.find("windows") > -1:
elif osname.find("cygwin") > -1:
    • Change into the /opt/pDynamo-1.7.2/installation directory and type python to run the installation. If all goes well, after several minutes, the console will display an Installation terminated message.
    • Set the pDynamo environment variables for Cygwin referring to the 00ReadMe.txt file located in the /opt/pDynamo-1.7.2/installation directory.
    • Change into your home directory on Cygwin and edit the .bash_profile file. These are the environment variables that are set for this installation:
export CYGWIN
    • Close Cygwin session and then open a new session to update the environment variables.

Test the Cygwin installation:

    • Change into the /opt/pDynamo-1.7.2/book/examples directory. Type python which should run by default since it just tests the Python installation.
    • The real test is python This program uses the pDynamo files that are created during the installation process. If they did not link properly there will be an error message like:
ImportError: No module named Matrix

This was a very simple test. Example programs further down the list might still fail if any of the other environment variables are incorrect.

General troubleshooting notes:

The installation for Cygwin is pretty straight forward. The most common problem is from an error entering the environment variables.

    • Double-check the PATH for Windows and make sure there isn't any way a Windows version of a program running within Cygwin can be found.
    • The only problem I have seen with Cygwin involved problems with Python parsing the command line. I added the urlgrabber, python-feedparser and libpopt0 as described in the Cygwin installation section and haven't seen any other issues.

If there are problems, please feel free to contact me at the email address given at the beginning of these notes and I will do my best to help resolve the issues.