<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thank You so much Phil!! I tried that example. Yes that error is gone and it is able to build the project using PyQt-builder</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
But the install failed with the below error. </div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">sxxx:sip sumxxx$ sip-install --tracing</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Querying qmake about your Qt installation...</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">These bindings will be built: QtChart.</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Generating the QtChart bindings...</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Generating the .pro file for the QtChart module...</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Generating the top-level .pro file...</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Generating the Makefiles...</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Compiling the project...</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Installing the project...</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">sip-install: 'make install' failed returning 2</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures"><br>
</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">if I just use sip-build it builts the project</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures"></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">sxxx:sip sumxxx$ sip-build</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Querying qmake about your Qt installation...</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">These bindings will be built: QtChart.</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Generating the QtChart bindings...</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Generating the .pro file for the QtChart module...</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Generating the top-level .pro file...</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Generating the Makefiles...</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Compiling the project...</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">The project has been built.</span></p>
<br>
</span>
<p></p>
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
But how do I install in a virtual Environment. If I specify target-Dir like this it throws the below error</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">(pythonBindingsEnv) sumanc2:sip sum10122$ sip-install --target-dir pythonBindingsEnv</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Querying qmake about your Qt installation...</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">These bindings will be built: QtChart.</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Generating the QtChart bindings...</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">sip-install: Unable to find file "QtGui/QtGuimod.sip"</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures"><br>
</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">So my question what is the way to install the generated python library in a virtual environment</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures"><br>
</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Kindly let me know what to do.... I will really appreciate it.</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Thank You,</span></p>
<p style="margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Menlo;color:#000000"><span style="font-variant-ligatures:no-common-ligatures">Suman</span></p>
<br>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Phil Thompson <phil@riverbankcomputing.com><br>
<b>Sent:</b> Friday, April 23, 2021 6:55 AM<br>
<b>To:</b> Suman Chatterjee <sum_chat@hotmail.com><br>
<b>Cc:</b> pyqt@riverbankcomputing.com <pyqt@riverbankcomputing.com><br>
<b>Subject:</b> Re: need help with generating python bindings</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">On 23/04/2021 01:10, Suman Chatterjee wrote:<br>
> Hi,<br>
> I am following the hello demo to create python bindings using sip. I<br>
> have installed PyQt5-5.15.4, sip-6.0.3 as below<br>
> <br>
> <br>
> Requirement already satisfied: toml in<br>
> /usr/local/lib/python3.9/site-packages (from sip) (0.10.2)<br>
> <br>
> Requirement already satisfied: pyparsing>=2.0.2 in<br>
> /usr/local/lib/python3.9/site-packages (from packaging->sip) (2.4.7)<br>
> <br>
> Installing collected packages: sip, PyQt5<br>
> <br>
> Successfully installed PyQt5-5.15.4 sip-6.0.3<br>
> <br>
> I also wrote the hello.sip file as below<br>
> <br>
> %Module(name=hello, language="C")<br>
> %Import QtCore/QtCoremod.sip<br>
> class Hello : QLabel {<br>
> %TypeHeaderCode<br>
> #include <hello.h><br>
> %End<br>
> ......<br>
> <br>
> Then when I run sip-install it throws me the below error .<br>
> <br>
> <br>
> VVVV:sip XXXXXX$ sip-install<br>
> <br>
> These bindings will be built: hello.<br>
> <br>
> Generating the hello bindings...<br>
> <br>
> sip-install: Unable to find file "QtCore/QtCoremod.sip"<br>
> <br>
> <br>
> But I verified the file exists in the path<br>
> usr⁩ ▸ ⁨local⁩ ▸ ⁨lib⁩ ▸ ⁨python3.9⁩ ▸ ⁨site-packages⁩ ▸ ⁨PyQt5⁩ ▸<br>
> ⁨bindings⁩ ▸ ⁨QtCore⁩<br>
> <br>
> <br>
> So how do I point to that bindings folder. I tried exporting that Path<br>
> in my bash_profile. But it did not help.<br>
> <br>
> I will really appreciate if anyone can please help me out<br>
<br>
If you are building bindings on top of PyQt then you need to use <br>
PyQt-builder. This implements extensions to SIP.<br>
<br>
<a href="https://www.riverbankcomputing.com/static/Docs/PyQt-builder/">https://www.riverbankcomputing.com/static/Docs/PyQt-builder/</a><br>
<br>
Phil<br>
</div>
</span></font></div>
</div>
</body>
</html>