使用pyuic5时遇到的问题

2024-05-14 00:40:14 发布

您现在位置:Python中文网/ 问答频道 /正文

我的机器上安装了Python3.8.5,我安装了pyuic5,并使用它将.ui转换为.py文件(使用cmd)。我最近升级到python 3.8.7,每当我现在尝试转换时,都会出现以下错误:

C:\Users\....>pyuic5 -x Windows.ui -o Windows.py
Fatal error in launcher: Unable to create process using '"d:\program files\python3.8.5\python.exe"  "D:\Program Files\Python 3.8.7\Scripts\pyuic5.exe" -x Windows.ui -o Windows.py': The system cannot find the file specified.

我确保pyqt5和pyuic5已正确安装。我不是专家,但我相信cmd正在从python3.8.5文件夹(我安装的旧版本)中查找python.exe文件,而不是python3.8.7文件夹中的文件


Tags: 文件inpy文件夹cmd机器uiwindows