[PyQt] configure PyQt with anaconda

scott zimmerman scottz1 at hotmail.com
Mon Jan 11 04:22:41 GMT 2016


I debugged configure.py further and found the problem with nmake. According to subprocess.Popen docs, if 'env' is None, it's supposed to inherit the parent process environment (which in this case, would be my VS2015 console window), but that's just not working. I temporarily hard-coded the path to nmake in the script. That enabled nmake to run but then I got the same error with 'cl' when the script tried to compile the first C file. It's the same problem, the path variable (that should tell the script how to find nmake and cl) is not in the environment that Popen is using when it spawns those commands.
 
From: scottz1 at hotmail.com
To: phil at riverbankcomputing.com
CC: pyqt at riverbankcomputing.com
Subject: RE: [PyQt] configure PyQt with anaconda
Date: Sat, 9 Jan 2016 04:51:09 -0500




I ran configure.py in the pycharm debugger and discovered the first problem: anaconda is prepending it's own bin directory to the path that is returned by os.environ.get in _find_exe.
 
A second problem is that TargetConfiguration.__init__ is called in main before parsing the command line. Since find_exe does find an old qmake.exe, it ignores --qmake when I try to specify the path.
 
So I temporarily hard-coded the initialization of self.qmake in TargetConfiguration.__init__ (instead of calling _find_exe).
 
The script ran further until it reaches a third problem that I haven't debugged:  Error: nmake is not recognized as a command.
 
fyi, self.qmake_spec = 'win32-msvc2015'

 
From: scottz1 at hotmail.com
To: phil at riverbankcomputing.com
CC: pyqt at riverbankcomputing.com
Subject: RE: [PyQt] configure PyQt with anaconda
Date: Fri, 8 Jan 2016 22:04:51 -0500




Previously I edited the environment variable with the system app, and then VS command prompt prepended other folders to the front of the path. So now in that same command prompt, I did this to put the bin folder on the very front of the path.
 
1. changed dir into the pyqt folder
2. path=\python\qt\5.5\msvc2013_64\bin;%path%
3. python configure.py
 
gets error "PyQt5 requires Qt v5.0."
 
From: scottz1 at hotmail.com
To: phil at riverbankcomputing.com
CC: pyqt at riverbankcomputing.com
Subject: RE: [PyQt] configure PyQt with anaconda
Date: Fri, 8 Jan 2016 21:59:30 -0500




It reports:
 
qmake version 3.0
using qt version 3.5.1 in c:/python/qt/5.5/msvc2013_64/lib
 
Although it reports "/lib", qmake.exe is in /bin
 
> Subject: Re: [PyQt] configure PyQt with anaconda
> From: phil at riverbankcomputing.com
> Date: Fri, 8 Jan 2016 10:11:04 +0000
> CC: pyqt at riverbankcomputing.com
> To: scottz1 at hotmail.com
> 
> On 8 Jan 2016, at 2:55 am, scott zimmerman <scottz1 at hotmail.com> wrote:
> > 
> > I've tried all these suggestions and all get errors:
> >  
> > 1. I put \Python\Qt\5.5\msvc2013_64\bin at the front of the system path; launched VS x64 native tools command prompt. Note that VS command prompt prepends several other paths at the front of the path, so the Qt path is not first.
> 
> At this command prompt run qmake -v What's the output?
> 
> Run configure.py with the --verbose option to see the detail of what's goin wrong.
> 
> Phil
> 
 		 	   		   		 	   		   		 	   		   		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160110/0b70ad56/attachment.html>


More information about the PyQt mailing list