A. In order to run Geomatica Python libraries outside of Focus (i.e. Command Line, IDE) you need to make sure that both Geomatica and Python are correctly installed to work together. In Python Command Line or your IDE, type import pci to check if the library can be properly imported - See Getting Started with Geomatica and Python.
If the installations are not properly set up you may receive an error similar to the following:
- No module named 'pci'
- Failed to initialize the PCI Pluggable Framework...
- ImportError: DLL load failed
Try each of the steps below to resolve this error. After each step, run import pci again to check if the issue is resolved.
- Make sure that python 2.7 is installed
- Make sure that python can be run through the Focus Python Scripting Window. Open Focus > Tools > Python Scripting. Type import pci and click RUN.
- Log out of the user account on the computer and log back in. You can also restart the computer entirely.
- If you have multiple Python versions installed, make sure you are using the 64-bit python 2.7 version. For an IDE, make sure that you have set the correct python version in the options. In CMD, make sure that you are running python from the correct folder:
- Navigate to the python27 folder > cd C:\python27 (this could be different based on your installation)
- Run your python script from this folder in CMD
If the error persists, please contact firstname.lastname@example.org.