Hallo zusammen,
ich habe einen Pi 4 Model B Rev 1.5 (Revision : b03115 mit Pi reference 2023-02-21) und möchte ein Python Script (*.pyw als Endung) zum Laufen bekommen, was aber nicht von mir ist. (Ich bin nur Anwender)
Die Infos vom damaligen Entwickler waren
Das Script wurde unter Python 3.7 begonnen und läuft aktuell unter Python 3.9.
Es werden folgende Software-Module importiert/benutzt:
import time
import math
import mouse
import csv
import tkinter as tk
from tkinter import ttk
from tkVideoPlayer import TkinterVideo
from os import system
from threading import Timer, Thread
from PIL import Image, ImageTk
import smbus
import board
import busio
import digitalio
from adafruit_mcp230xx.mcp23017 import MCP23017
Wenn ich in IDLE (siehe Anhang) das Script starte kommt die Meldung:
Traceback (most recent call last):
File "/home/pi/Desktop/CRM_Game_V1.0.pyw", line 18, in <module>
from tkVideoPlayer import TkinterVideo
File "/usr/local/lib/python3.9/dist-packages/tkVideoPlayer/__init__.py", line 1, in <module>
from tkVideoPlayer.tkvideoplayer import TkinterVideo
File "/usr/local/lib/python3.9/dist-packages/tkVideoPlayer/tkvideoplayer.py", line 6, in <module>
from PIL import ImageTk, Image, ImageOps
ImportError: cannot import name 'ImageTk' from 'PIL' (/usr/lib/python3/dist-packages/PIL/__init__.py)
>>>
Soweit ich das jetzt durch Anlesen verstanden habe, benötigt er die Module und die fehlen.
Am Anfang hat er auch nach "mouse" gefragt. Das habe ich dann mit
installiert und es scheint geklappt zu haben.
Wenn ich aber andere installiere kommen Fehlermeldungen wie:
pi@crm:~ $ sudo pip3 install imageTk
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
ERROR: Could not find a version that satisfies the requirement imageTk
ERROR: No matching distribution found for imageTk
Kann mir jemand helfen bzw. sagen was ich falsch mache bzw. wo ich suchen muss/bzw. machen muss?
Herzlichen Dank.