Using Pyside2 in Unreal reports an error: ModuleNotFoundError: No module named 'PySide2'

An error occurs when using the QT interface in Unreal ModuleNotFoundError: No module named 'PySide2'. The specific performance is as follows:
Insert image description here

  • Reason: unreal python cannot read the path of Pyside2.
  • Solution: Use sys to add the site-packages directory where pyside2 is located.
import unreal
import sys
sys.path.append('C:/Python27/Lib/site-packages')
from PySide2 import QtGui, QtUiTools

Guess you like

Origin blog.csdn.net/qq_41073715/article/details/127759539