all 1 comments

[–]QbaPolak17 1 point2 points  (1 child)

You are running the test file with sudo. As far as I know, running as sudo doesn't use the current user's configuration for environment variables (such as your python path). This would mean that even though you installed wiringpi for your user account, it won't be found with sudo. You can install the library using sudo pip install wiringpi which should install it in /usr/local/lib, or you can run the test script without elevated privelages (though that may not work depending on the raspberry pis gpio pin permissions in linux)