ImportError: No module named Adafruit_SSD1306

Python python at python.invalid
Wed Dec 4 18:15:28 EST 2019


Le 05/12/2019 à 00:06, RobH a écrit :
> On 04/12/2019 22:33, Wildman wrote:
>> On Wed, 04 Dec 2019 20:25:33 +0000, RobH wrote:
>>
>>> I am trying to do this project on a pi zero:
>>>
>>> http://frederickvandenbosch.be/?p=1365
>>>
>>> I copied the code to the pi zero Download folder and when I run it I get
>>> the above error at line 4
>>> Import Adafruit_SSD1306
>>>
>>> I am using python version 2.7.16, if that makes any difference
>>> I have the same module as the authors' link goes to :
>>>
>>> Monochrome 1.3" 128x64 OLED graphic display - STEMMA QT / Qwiic
>>>
>>> Have I missed something.
>>
>> The error indicates that Adafruit_SSD1306 in not installed.
>>
>> https://github.com/adafruit/Adafruit_Python_SSD1306
>>
> 
> I have the library in the same Downloads folder, but I don't know how to 
> actually install it as it doesn't have an .sh file included

What cannot you understand in the Installing section of README.md?

   sudo python -m pip install --upgrade pip setuptools wheel
   sudo pip install Adafruit-SSD1306

   Or alternatively:

   sudo python -m pip install --upgrade pip setuptools wheel
   git clone https://github.com/adafruit/Adafruit_Python_SSD1306.git
   cd Adafruit_Python_SSD1306
   sudo python setup.py install

even WORSE, what cannot you undertand at the top of same file?

   This library has been deprecated! We are leaving this up for
   historical and research purposes but archiving the repository.




More information about the Python-list mailing list