Python API - Windows installation steps¶
How to install the Ximea Python module:¶
To install our Python API into your Windows system please follow these steps:
- Install the Beta Release of the Ximea API SP - Select xiApiPython checkbox in the API list.
- Install Python - Download version suitable for your architecture from https://www.python.org/downloads/ and install it.
- Set Python path - Necessary if you want to use python from command prompt. This is the path to directory, where Python is installed. Go to Control Panel > System > Advanced system settings > Environment Variables > System variables > Path and click "Edit...". Add to the end of Variable value: ";C:\PythonXY;C:\PythonXY\Scripts" (without quotes), where XY is the version and subversion of installed Python. E.g. for Python2.7, add ";C:\Python27;C:\Python27\Scripts" (In case Python is installed in a different location, please add path to this location). It may be necessary to restart your computer for the changes to take effect.
- Install the Ximea module - Copy the whole folder \XIMEA\API\Python\v{x}\ximea (depending on the Python version) to site-packages.
Additional tools installation:¶
The following steps are optional. However, these steps are necessary for running all examples:
- pip (package manager) - Python versions >=2.7.9 and >=3.4 has pip already installed, so try to write this command into the command prompt:
pip --version
It should print the version of the pip. If not, please check if the path is correctly set (see step 2. above). If it is set correctly and you have an older version of Python, install pip from this page or consider upgrading to a newer version of Python.
- numpy (highly recommended) - Simply using pip, in command prompt write:
pip install numpy
and then in python run:
import numpy
numpy.__version__
- matplotlib - In command prompt write:
pip install matplotlib
and then in python run:
import matplotlib
matplotlib.__version__
- Pillow - In the command prompt write:
pip install Pillow
and then in python run:
import PIL
PIL.__version__
- OpenCV
Examples¶
See the examples folder: \XIMEA\API\Python\examples