tower429 / pythonxy

Automatically exported from code.google.com/p/pythonxy
0 stars 0 forks source link

PyQt4 Qt Designer unable to find uic #216

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
If relevant, please answer to the following questions:
1. What version of Python(x,y) have you installed?
2.6.5.3
2. Which components have you installed (Python(x,y) installer: component
page):
    b. I selected the "Full" component selection?
3. Have you selected the option "Customize installation directories"?
b. No
4. If the answer to 3. is yes, what installation directories have you
chosen?
5. Where did you install Python(x,y) itself?
a. default path
6. Have you installed Python(x,y):
    b. For "All users"
7. What is your operating system?
a. Windows XP
8. When you installed Python(x,y), were you logged in as :
b. an administrator of the machine
9. If you are using Windows Vista, have you installed Python(x,y):
a. simply by double-clicking on the installer
    b. by right-clicking on the installer and selecting "Run as an
administrator"
10. Regarding installed softwares on your machine, how did you clean your
machine before installing Python(x,y) (multiple answers are possible):
a. you didn't do anything, you installed Python(x,y) directly on your
machine without precaution

What steps will reproduce the problem?
1. Open Qt Designer create new Form.
2. Go to Form Menu -> View Code.

What is the expected output? What do you see instead?
I expect to see the code. Instead I see the attached error message.

Original issue reported on code.google.com by boblouns...@gmail.com on 18 Nov 2010 at 9:46

Attachments:

GoogleCodeExporter commented 9 years ago
I have the same problem under Windows 7, PythonXY v2.6.6.0.  (Answers are all 
the same otherwise.)  Python also is unable to run pyuic.py from the command 
line: adding paths to PYTHONPATH or PATH have no effect and it cannot find the 
file.

Example:

C:\Users\My Name\Documents\Python\UI> python pyuic.py MyUI.ui -o ..\MyUI.py
C:\Python26\python.exe: can't open file 'pyuic.py': [Errno 2] No such file or 
directory

Original comment by orbital...@gmail.com on 23 May 2011 at 8:21

GoogleCodeExporter commented 9 years ago
Same issue... my error dialog reads: Unable to launch: 
C:/Python27/Lib/site-packages/PyQt4\uic

It seems the slashes are the wrong direction.

I'm on Windows XP with Python(x,y) 2.7.2.1 installed in default directory for 
all users.

Original comment by flutefre...@gmail.com on 20 Feb 2012 at 4:31

GoogleCodeExporter commented 9 years ago
Same isseu here....

Win 7, Python 2.7 at the default directory....

\=

Original comment by sipm...@gmail.com on 3 Mar 2012 at 2:17

GoogleCodeExporter commented 9 years ago
Same issue here.

Running Qt Designer from Python(x,y) 2.7 on Windows 7.
Any help would be appreciated.
Exactly the same error as Comment 2.

Original comment by eng.fern...@gmail.com on 9 Apr 2012 at 3:33

GoogleCodeExporter commented 9 years ago
Same issue, running Windows XP with QT Designed 4.7.4 after doing full install 
of Python(x,y) V2.7.2.2

Original comment by jrenf...@gmail.com on 4 May 2012 at 4:52

GoogleCodeExporter commented 9 years ago
You can generate code by using the pyuic4.bat file located under the PyQt4 
install directory, on Win usually C:/Python##/Lib/site-packages/PyQt4.

Usage from the command line is:
pyuic4.bat inputfile.ui > output.py

If you are going to use the pyuic.py file then then you either have to use 
"python C:\complete_path_to\pyuic.py" or already be in the directory containing 
pyuic.py (it's in the uic installation subdirectory).  For instance if you are 
in the ..\site-packages\PyQt4\uic\ directory already in the command line then 
you'd use:
python pyuic.py inputfile.ui > output.py

Remember that inputfile.ui and output.py will need their complete paths too.

Original comment by benjamin...@gmail.com on 10 May 2012 at 9:56

GoogleCodeExporter commented 9 years ago
Python(x,y)sets C:\Python##\Lib\site-packages\PyQt4 into the PATH environment 
variable. So, from a command prompt simply 'cd \path\to\uifile' and run:

pyuic4 inputfile.ui > outputfile.py

Original comment by boblouns...@gmail.com on 11 May 2012 at 3:47

GoogleCodeExporter commented 9 years ago
Despite the workaround everybody is aware of this is still an issue.

Original comment by lbologn...@gmail.com on 18 Oct 2012 at 2:56

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
After step six, Add following lines to get your window on your screen
if __name__=='__main__':
    import sys
    app=QtGui.QApplication(sys.argv)
    Form=QtGui.QWidget()
    ui=Ui_Form()
    ui.setupUi(Form)
    Form.show()
    sys.exit(app.exec_())

Original comment by punchedr...@gmail.com on 6 Apr 2013 at 5:42

GoogleCodeExporter commented 9 years ago
@10:

What 'step 6' are you referring to?

Original comment by gerrit...@baarda.eu on 4 Oct 2013 at 12:01

GoogleCodeExporter commented 9 years ago
Mesmo erro ;( eles bem que podiam arrumar.

Language portuguese

Original comment by SplashCr...@gmail.com on 28 Jul 2014 at 1:25

GoogleCodeExporter commented 9 years ago
still no fix?

Original comment by aaronjud...@gmail.com on 16 Oct 2014 at 11:44