![]() |
error no 2: no such file - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: error no 2: no such file (/thread-3338.html) |
error no 2: no such file - panoss - May-16-2017 I 've made an exe with Pyinstaller. But when I try to run it, I get an error: error no 2: no such file or directory: 'betws.ui' This is the name of my form ( 'betws.ui'), so I should also include it in my .spec file? I tried this, after 'binaries=[],' I added: datas= [('betws.ui','gui')],But I get the same error when I try to run it. So, how can I include my form? RE: error no 2: no such file - metulburr - May-16-2017 Where is betws.ui located in your program structure? note: I dont use pyinstaller so i am not familiar with their specs RE: error no 2: no such file - panoss - May-16-2017 It's in the same folder with the .py file. The .py file loads the ui ('betws.ui') with this code: class MyApp(QtGui.QMainWindow, QtGui.QWidget): def __init__(self): QtGui.QMainWindow.__init__(self) self.ui = uic.loadUi('betws.ui', self) RE: error no 2: no such file - snippsat - May-16-2017 Use pyuic5 to make a Python file that dos not relay on betws.ui .pyuic5 -x betws.ui -o my_gui.py Now run Pyinstaller on .py file.There are some talk here,how to do it with .ui file in Pyinstaller.
RE: error no 2: no such file - panoss - May-16-2017 (May-16-2017, 02:39 PM)snippsat Wrote: There are some talk here,how to do it with Thanks, I solved this way. |