I try to use RPi.GPIO with Python 3.6.
I installed RPi.GPIO and it's working with Python 3.4, but not with Python 3.6
I get this Error:
ModuleNotFoundError: No module named 'RPi'
I immport the module in my script like this:
import RPi.GPIO as GPIO
解决方案
Add this line to the top of your *.py file:
#!/usr/bin/env python3.6
Run these commands in your shell:
sudo python3.6 -m pip install --upgrade pip setuptools wheel
sudo python3.6 -m pip install RPi.GPIO
This should fix the Problem.
By this you will install RPi.GPIO for the right python version. In this case 3.6.x.