Pycharm 转化ui文件为py文件:报错Error in input file: not well-formed (invalid token): line 1, column 1

利用PyUIC转化 .ui文件为 .py文件时,报错 Error in input file: not well-formed (invalid token): line 1, column 1

我出错的原因是工作目录设置不当。

在File -> Setting -> Tools -> External Tools中重新配置PyUIC,

Program 为 pyuic5.exe 的路径。 我这里为:C:\Users\WYQ\Anaconda3\Scripts\pyuic5.exe

Arguments 为:

$FileName$ -o $FileNameWithoutExtension$.py

Working directory为要将.ui文件转化为.py文件的文件夹路径,这个就因不同的项目而异了。(我就是没有改变这个目录,使用的默认路径)

你可能感兴趣的:(PyQt5,python)