Control Raspberry I/O pin with EXEC

See How to solve Exec binding problems

The problem likely has to do with the fact that openHAB runs as the openHAB user and you probably installed the python libraries you are using only as your user rather than the system and they are therefore not available to the openhab user. Another explanation could be that the script is expecting to be executed from a specific folder but openHAB will be running the script from its own folder.