按照[教程](https://shumeipai.nxez.com/2019/04/29/use-the-ssd1306-oled-display-on-the-raspberry-pi.html)做了。 有两个问题: ```bash pi@raspberrypi:~ $ sudo pip2 install Adafruit-SSD1306 DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied: Adafruit-SSD1306 in /usr/local/lib/python2.7/dist-packages/Adafruit_SSD1306-1.6.2-py2.7.egg (1.6.2) Requirement already satisfied: Adafruit-GPIO>=0.6.5 in /usr/local/lib/python2.7/dist-packages/Adafruit_GPIO-1.0.4-py2.7.egg (from Adafruit-SSD1306) (1.0.4) Requirement already satisfied: adafruit-pureio in /usr/local/lib/python2.7/dist-packages/Adafruit_PureIO-1.1.5-py2.7.egg (from Adafruit-GPIO>=0.6.5->Adafruit-SSD1306) (1.1.5) ERROR: Package 'Adafruit-PureIO' requires a different Python: 2.7.16 not in '>=3.5.0' ```
```bash pi@raspberrypi:~ $ sudo python stats.py Traceback (most recent call last): File "stats.py", line 47, in <module> disp = Adafruit_SSD1306.SSD1306_128_32(rst=RST) File "build/bdist.linux-armv7l/egg/Adafruit_SSD1306/SSD1306.py", line 288, in __init__ File "build/bdist.linux-armv7l/egg/Adafruit_SSD1306/SSD1306.py", line 85, in __init__ File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/GPIO.py", line 420, in get_platform_gpio ImportError: No module named Adafruit_BBIO.GPIO ```
```ERROR: Package 'Adafruit-PureIO' requires a different Python: 2.7.16 not in '>=3.5.0``` 应该就是这个问题。
@Spoony 又试了一下,还是不行 pi@raspberrypi:~ $ sudo python stats.py Traceback (most recent call last): File "stats.py", line 47, in <module> disp = Adafruit_SSD1306.SSD1306_128_32(rst=RST) File "build/bdist.linux-armv7l/egg/Adafruit_SSD1306/SSD1306.py", line 288, in __init__ File "build/bdist.linux-armv7l/egg/Adafruit_SSD1306/SSD1306.py", line 85, in __init__ File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/GPIO.py", line 420, in get_platform_gpio ImportError: No module named Adafruit_BBIO.GPIO