OpenPIV would not have been possible if other great open source projects did not exist. We make extensive use of code and tools that other people have created, so you should install them before you can use OpenPIV.
The dependencies are:
On all platforms, the following Python distributions arerecommended:
- Canopy <http://www.enthought.com>
- Anaconda <https://store.continuum.io/cshop/anaconda/>
- PythonXY <https://code.google.com/p/pythonxy/>
- WinPython <http://winpython.sourceforge.net/>
How to install the dependencies on Linux¶
On a Linux platform installing these dependencies should be trick. Often, if not always, python is installed by default, while the other dependencies should appear in your package manager.
How to install the dependencies on Windows¶
On Windows all these dependencies, as well as several other useful packages, can be installed using the Python(x,y) distribution, available at http://www.pythonxy.com/. Note: Install it in Custom Directories, without spaces in the directory names (i.e. Program Files are prohibited), e.g. C:Pythonxy
How to install the dependencies on a Mac¶
The binary (32 or 64 bit) Enthought Python Distribution (EPD) is recommended. Visit http://www.enthought.com. However, if you use EPD Free distribution, you need to install Cython from http://www.cython.org
Some distributions lack progressbar package. Install it separately using pip
pip install progressbar
Get OpenPIV source code!¶
Bleeding edge development version¶
If you are interested in the source code you are welcome to browse out git repository stored at https://github.com/alexlib/openpiv-python. If you want to download the source code on your machine, for testing, you need to set up git on your computer. Please look at http://help.github.com/ which provide extensive help for how to set up git.
To follow the development of OpenPIV, clone our repository with the command:
git clone http://github.com/alexlib/openpiv-python.git
and update from time to time. You can also download a tarball containing everything.
Then add the path where the OpenPIV source are to the PYTHONPATH environment variable, so that OpenPIV module can be imported and used in your programs. Remeber to build the extension with
python setup.py build_ext --inplace
Module import on Windows 7 64-bit¶
If you are working on a Windows 7 64-bit computer, you may face several problems while trying to import the OpenPIV modules. The following instructions provide a workaround and a short list of issues encountered while trying other alternatives than the one here presented.
Install Enthought Canopy 32-bit no matter if the OS is 64-bit.
Install Visual Studio 8 Express (32 bit) from
Install the full version of Windows SDK for Windows 7 and .NET Framework 3.5 SP1 from
Remove in /openpiv/src/ the two .c files: lib.c and process.c - so they’ll be regenerated by Cython from the .pyx files
In Command Prompt Interface, while executing Python, go to the directory containing OpenPIV and import the OpenPIV modules with:
python setup.py build_ext –inplace
PS. I have had a similar experience while working with a GIS system on a Windows 64-bit machine and trying to get Python modules to work. I started with a Python 64-bit MSI Installer and was not able to find the modules from the GIS system. I ended up installing the Python 32-bit version which worked. My uneducated (perhaps obvious) guess is that the problem lies on the flavour. Maybe a header line stating this (if proved) would be good.
Issues that led to this Workaround:¶
When using the visual Studio Redistributable Setup x64 the vcvarsall.bat file may not be available, which is needed to activate the C+ compiler.
When installing just the C+ compiler tools from SDK the fike basetsd.h may not be available or simply not found, causing cl.exe to not be properly executed, with following error message:
“Fatal error C1083: Cannot open include file: ‘basetsd.h’: No such file or directory error: command ‘“C:Program Files (x86)Microsoft Visual Studio 9.0VCBINcl.exe”
- If the command line python setup.py build is used, the following error may appear:
- “ImportError: No module named lib”
The use of MinGW instead of Visual Studio for the C compiler has been tried and produces the same error as above:
“ImportError: No module named lib”