From the error you are getting, it sounds like the WiringPi2-Python library might not have installed correctly. Can you try re-entering the commands for downloading and installing WiringPi2-Python listed in the “Installation” section of the Python library for the DRV8835 Dual Motor Driver Kit for Raspberry Pi GitHub page? Can you post a copy of the output you get when you run those commands?
NOTE: To compile programs with wiringPi, you need to add:
-lwiringPi
to your compile line(s) To use the Gertboard, MaxDetect, etc.
code (the devLib), you need to also add:
-lwiringPiDev
to your compile line(s).
Terminal did a bunch of stuff then said it needed to get 18.2mb of archives
and that it needed 25.7mb of additional space to be used (I have a 32gb card with plenty of space)
Terminal asks: "Do you want to continue? [Y/n]
Enter: y
Terminal does stuff…
Finally after that’s done enter: sudo python setup.py install
Terminal does a bunch more stuff.
When it’s done it tells me where it installed to and that the version of wiringpi2 is 1.1.1
Yes, on Raspbian and other Debian-based systems, the command python usually corresponds to Python 2. You can check this by running python --version. So if you run sudo python example.py, you are still using Python 2.
I looked into the error you were getting and it turned out that it was a bug in the WiringPi2-Python repository, and that repository is deprecated. We just published a new version of the drv8835-motor-driver-rpi library which fixes this problem, and it has simpler instructions that should work with both Python 2 and Python 3. Please try the new instructions and let me know if you have any issues.