[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] configure PyQt with anaconda
From:       scott zimmerman <scottz1 () hotmail ! com>
Date:       2016-01-11 4:22:41
Message-ID: COL130-W5451791DFC7FE576D19017FBC90 () phx ! gbl
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@hotmail.com
To: phil@riverbankcomputing.com
CC: pyqt@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@hotmail.com
To: phil@riverbankcomputing.com
CC: pyqt@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@hotmail.com
To: phil@riverbankcomputing.com
CC: pyqt@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@riverbankcomputing.com
> Date: Fri, 8 Jan 2016 10:11:04 +0000
> CC: pyqt@riverbankcomputing.com
> To: scottz1@hotmail.com
> 
> On 8 Jan 2016, at 2:55 am, scott zimmerman <scottz1@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
> 
 		 	   		   		 	   		   		 	   		   		 	   		  


[Attachment #5 (text/html)]

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>I debugged&nbsp;configure.py further and \
found&nbsp;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.&nbsp;I temporarily \
hard-coded the path to nmake&nbsp;in the script. That enabled nmake to&nbsp;run but \
then I got the same error with 'cl' when&nbsp;the script tried to compile the \
first&nbsp;C file. It's the same problem, the&nbsp;path variable (that should tell \
the script how to find&nbsp;nmake and cl) is not&nbsp;in the environment \
that&nbsp;Popen is using when it spawns those commands.<br>&nbsp;<BR><div><hr \
id="stopSpelling">From: scottz1@hotmail.com<br>To: phil@riverbankcomputing.com<br>CC: \
pyqt@riverbankcomputing.com<br>Subject: RE: [PyQt] configure PyQt with \
anaconda<br>Date: Sat, 9 Jan 2016 04:51:09 -0500<br><br>

<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}

.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}

--></style>
<div dir="ltr">I ran configure.py in the pycharm debugger and&nbsp;discovered the \
first problem: anaconda is prepending it's own&nbsp;bin directory to the&nbsp;path \
that is returned by os.environ.get in _find_exe.<br>&nbsp;<br>A second problem \
is&nbsp;that TargetConfiguration.__init__ is called in main before parsing the \
command line. Since&nbsp;find_exe&nbsp;does find an old qmake.exe,&nbsp;it ignores \
--qmake&nbsp;when I try to specify the path.<br>&nbsp;<br>So&nbsp;I temporarily \
hard-coded the initialization of&nbsp;self.qmake in TargetConfiguration.__init__ \
(instead of calling _find_exe).<br>&nbsp;<br>The script ran&nbsp;further&nbsp;until \
it reaches a third problem that I haven't debugged:&nbsp; Error:&nbsp;nmake is not \
recognized as a command.<br>&nbsp;<br>fyi, self.qmake_spec = \
'win32-msvc2015'<br><br>&nbsp;<br><div><hr id="ecxstopSpelling">From: \
scottz1@hotmail.com<br>To: phil@riverbankcomputing.com<br>CC: \
pyqt@riverbankcomputing.com<br>Subject: RE: [PyQt] configure PyQt with \
anaconda<br>Date: Fri, 8 Jan 2016 22:04:51 -0500<br><br>

<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}

.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}


--></style>
<div dir="ltr">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.<br>&nbsp;<br>1.&nbsp;changed dir&nbsp;into the pyqt folder<br>2. \
path=\python\qt\5.5\msvc2013_64\bin;%path%<br>3. python \
configure.py<br>&nbsp;<br>gets error "PyQt5 \
requires&nbsp;Qt&nbsp;v5.0."<br>&nbsp;<br><div><hr id="ecxstopSpelling">From: \
scottz1@hotmail.com<br>To: phil@riverbankcomputing.com<br>CC: \
pyqt@riverbankcomputing.com<br>Subject: RE: [PyQt] configure PyQt with \
anaconda<br>Date: Fri, 8 Jan 2016 21:59:30 -0500<br><br>

<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}

.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}


--></style>
<div dir="ltr">It reports:<br>&nbsp;<br>qmake version 3.0<br>using qt version 3.5.1 \
in c:/python/qt/5.5/msvc2013_64/lib<br>&nbsp;<br>Although&nbsp;it \
reports&nbsp;"/lib", qmake.exe is in /bin<br>&nbsp;<br><div>&gt; Subject: Re: [PyQt] \
configure PyQt with anaconda<br>&gt; From: phil@riverbankcomputing.com<br>&gt; Date: \
Fri, 8 Jan 2016 10:11:04 +0000<br>&gt; CC: pyqt@riverbankcomputing.com<br>&gt; To: \
scottz1@hotmail.com<br>&gt; <br>&gt; On 8 Jan 2016, at 2:55 am, scott zimmerman \
&lt;scottz1@hotmail.com&gt; wrote:<br>&gt; &gt; <br>&gt; &gt; I've tried all these \
suggestions and all get errors:<br>&gt; &gt;  <br>&gt; &gt; 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.<br>&gt; <br>&gt; At this \
command prompt run qmake -v What's the output?<br>&gt; <br>&gt; Run configure.py with \
the --verbose option to see the detail of what's goin wrong.<br>&gt; <br>&gt; \
Phil<br>&gt; <br></div> 		 	   		  </div></div> 		 	   		  </div></div> 		 	   		  \
</div></div> 		 	   		  </div></body> </html>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic