Menu

#97 pyuic4.bat cannot call pyuic.py

New
nobody
None
Medium
Defect
2015-10-22
2013-12-07
Anonymous
No

Originally created by: ludovic_...@yahoo.fr

What steps will reproduce the problem?
1.Attempt to run pyuic4.bat in order to compile a pyqt ui file into a py file.

What is the expected output? What do you see instead?
Expect pyuic to generate a py file from the ui file.

Instead get an error:
python: can't open file '\Lib\site-packages\PyQt4\uic\pyuic.py': [Errno 2] No such file or directory

What version of the product are you using? On what operating system?
64-bit-3.3.2.3 on Windows 7 Utlimate, service pack 1

Please provide any additional information below.
The problem was solved by inserting the following line in the pyuic4.bat file:
call %~dp0..\..\scripts\env.bat
As the env.bat set the WINPYDIR to the correct path

Discussion

  • Siamak Sarmady

    Siamak Sarmady - 2015-10-21

    This problem still exist in 2.7.10

     
  • stonebig

    stonebig - 2015-10-22

    ok, let's rather do

    if "%WINPYDIR%"=="" call %~dp0..\..\scripts\env.bat
    
     
  • Siamak Sarmady

    Siamak Sarmady - 2015-10-22

    Oh, I did not notice your soloution. Adding the call to env.bat resolves the problem.

    The problem happens when the %WINPYDIR% is not defined in the windows (i.e. the env.bat has not been run).

    But he problem is that your soloution is not applied to the distributed pyuic4.bat file.

     

    Last edit: Siamak Sarmady 2015-10-22
  • stonebig

    stonebig - 2015-10-22
     

Log in to post a comment.