ModuleNotFoundError No module named image_rc appears in Python

Appears No module named 'image_rc'

After this operation, an error was reported : the background image of the window was set in QTdesigner, and an error occurred after converting the .ui file into a .py file.
Solution : Open python.exe (under the Anaconda environment, you can directly click the Windows key and then select Anaconda Prompt to open)
insert image description here
locate the folder of the current project, and then enter the command:

pyrcc5 -o image_rc.py image.qrc

Notice: The image in the command is the same as the name of the .qrc resource file written by yourself)

insert image description here
The image_rc.py file will be generated under the current project file

insert image description here
Then you will happily find that the error is solved!

Guess you like

Origin blog.csdn.net/qq_42455308/article/details/106865415