Skip to content
This repository was archived by the owner on May 16, 2023. It is now read-only.
This repository was archived by the owner on May 16, 2023. It is now read-only.

ModuleNotFoundError: No module named 'RPi' #50

@Zemml

Description

@Zemml

So i got everything set up and even the "printertest.py" works perfectly.
But if i try to run
python3 main.py
it fails with the following error message:

Traceback (most recent call last):
  File "main.py", line 18, in <module>
    import RPi.GPIO as GPIO
ModuleNotFoundError: No module named 'RPi'

or
python3 twitter.py
it fails with:

Traceback (most recent call last):
  File "twitter.py", line 30, in <module>
    import base64, HTMLParser, httplib, json, sys, urllib, zlib
ModuleNotFoundError: No module named 'HTMLParser'

If i try to run it with
python main.py
respectively
python twitter.py
it fails with:

Traceback (most recent call last):
  File "twitter.py", line 32, in <module>
    from Adafruit_Thermal import *
  File "/home/pi/Python-Thermal-Printer/Adafruit_Thermal.py", line 725
    def print (self, *args, **kwargs):
            ^


I'm not very into python, but I know it has something to do with the different python versions.
I hope somebody can help me here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions