Wie behebe ich ein Problem mit QtPdf in der Conda-Umgebung?Python

Python-Programme
Anonymous
 Wie behebe ich ein Problem mit QtPdf in der Conda-Umgebung?

Post by Anonymous »

Ich musste Python OCC verwenden, also habe ich Anaconda installiert und bin mir jetzt nicht sicher, warum QtPdf nicht funktioniert, während alles andere in Ordnung zu sein scheint. Ich habe Anaconda noch nie verwendet.
Schritte:

Code: Select all

conda create -n xxxx python=3.10.19
conda activate xxxx
conda install -c conda-forge pythonocc-core
conda install -c conda-forge pyside6
conda install -c conda-forge pandas
conda install -c conda-forge openpyxl
Danach habe ich mein vs-Studio mit Code geöffnet. und überprüft, ob der richtige Interpreter verwendet wird, und mein Skript ausgeführt.
Es heißt:

Code: Select all

Traceback (most recent call last):
File "PATH", line 1, in 
from PySide6.QtPdf import QPdfDocument
ModuleNotFoundError: No module named 'PySide6.QtPdf'
Dies ist ein minimal reproduzierbares Beispiel:

Code: Select all

from PySide6.QtPdf import QPdfDocument

print("Imported!")
Dies ist nur ein Beispielskript, da das Problem das gleiche ist. Wenn ich in der Conda-Umgebung bin, wird QtPdf nicht erkannt, aber wenn ich zu einer Nicht-Conda-Umgebung wechsle, funktioniert es einwandfrei.
Info:
Pyside6 - 6.8.3

qt6-main 6.8.3

PythonOCC - 7.9.0

Openpyxl - 3.1.5

Pandas – 2.3.3

Python – 3.10.19

Conda 25.5.1

Betriebssystem: win11

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post