<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Use pythonOCC with PyQt4 under MacOSX Snow Leopard (10.6)</title>
	<atom:link href="http://www.pythonocc.org/resources/build_install/use-pythonocc-with-pyqt4-under-macosx-snow-leopard-10-6/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pythonocc.org/resources/build_install/use-pythonocc-with-pyqt4-under-macosx-snow-leopard-10-6/</link>
	<description>3D CAD/CAE/PLM development framework for the Python programming language</description>
	<lastBuildDate>Wed, 21 Sep 2011 17:04:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jose Sanchez</title>
		<link>http://www.pythonocc.org/resources/build_install/use-pythonocc-with-pyqt4-under-macosx-snow-leopard-10-6/comment-page-1/#comment-4799</link>
		<dc:creator>Jose Sanchez</dc:creator>
		<pubDate>Tue, 19 Apr 2011 16:48:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythonocc.org/blog/?p=160#comment-4799</guid>
		<description>The links seem to be broken... is there any mirror?</description>
		<content:encoded><![CDATA[<p>The links seem to be broken&#8230; is there any mirror?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Paviot</title>
		<link>http://www.pythonocc.org/resources/build_install/use-pythonocc-with-pyqt4-under-macosx-snow-leopard-10-6/comment-page-1/#comment-3493</link>
		<dc:creator>Thomas Paviot</dc:creator>
		<pubDate>Fri, 28 Jan 2011 14:51:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythonocc.org/blog/?p=160#comment-3493</guid>
		<description>@bb The issue to report occurs when the PyQt you use is not x11 based. Actually, the GUI manager returns a bad window id to the Display3d.__Init__() method. Just build/install qt4-x11 and pyqt4 and it should be ok.</description>
		<content:encoded><![CDATA[<p>@bb The issue to report occurs when the PyQt you use is not x11 based. Actually, the GUI manager returns a bad window id to the Display3d.__Init__() method. Just build/install qt4-x11 and pyqt4 and it should be ok.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bb</title>
		<link>http://www.pythonocc.org/resources/build_install/use-pythonocc-with-pyqt4-under-macosx-snow-leopard-10-6/comment-page-1/#comment-3492</link>
		<dc:creator>bb</dc:creator>
		<pubDate>Fri, 28 Jan 2011 11:04:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythonocc.org/blog/?p=160#comment-3492</guid>
		<description>Hi,

i followed your discussion and tried for the past couple days to get pythonOOC up and running. I came pretty far, in that all individual parts seem to work: opencascade, qt4, pyqt4 and py-xlib. However, i get the famous

OverflowError: in method &#039;Display3d_Init&#039;, argument 2 of type &#039;int&#039;

when trying to run the samples.

 I use macports and according to the Portfile and the mailing list, the port &quot;qt4-mac&quot; with the &quot;+quartz&quot; flag disabled is qt4 built on X11 (not cocoa), i.e. it should be equivalent to qt4-x11 (?)
To increase the confusion, there&#039;s also a port &quot;qt4-x11&quot; for macports, but it seems to be broken....

Did anyone succeed in getting this all set up with macports? Or is fink the better alternative? I&#039;d rather stick with macports since my whole systems relies on it by now...

thanks or any help!</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>i followed your discussion and tried for the past couple days to get pythonOOC up and running. I came pretty far, in that all individual parts seem to work: opencascade, qt4, pyqt4 and py-xlib. However, i get the famous</p>
<p>OverflowError: in method &#8216;Display3d_Init&#8217;, argument 2 of type &#8216;int&#8217;</p>
<p>when trying to run the samples.</p>
<p> I use macports and according to the Portfile and the mailing list, the port &#8220;qt4-mac&#8221; with the &#8220;+quartz&#8221; flag disabled is qt4 built on X11 (not cocoa), i.e. it should be equivalent to qt4-x11 (?)<br />
To increase the confusion, there&#8217;s also a port &#8220;qt4-x11&#8243; for macports, but it seems to be broken&#8230;.</p>
<p>Did anyone succeed in getting this all set up with macports? Or is fink the better alternative? I&#8217;d rather stick with macports since my whole systems relies on it by now&#8230;</p>
<p>thanks or any help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benjamin Nortier</title>
		<link>http://www.pythonocc.org/resources/build_install/use-pythonocc-with-pyqt4-under-macosx-snow-leopard-10-6/comment-page-1/#comment-3265</link>
		<dc:creator>Benjamin Nortier</dc:creator>
		<pubDate>Fri, 07 Jan 2011 10:22:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythonocc.org/blog/?p=160#comment-3265</guid>
		<description>The above was using python2.6 from the Fink install. When I use the Mac Python, I can &#039;import Standard&#039; successfully, but when I get to the PyQt part:


&gt;&gt;&gt; from PyQt4.QtCore import *
Traceback (most recent call last):
  File &quot;&quot;, line 1, in 
ImportError: dlopen(PyQt4/QtCore.so, 2): Symbol not found: __PyByteArray_empty_string
  Referenced from: /sw64/lib/qt4-x11/lib/python2.6/site-packages/PyQt4/QtCore.so
  Expected in: flat namespace
 in /sw64/lib/qt4-x11/lib/python2.6/site-packages/PyQt4/QtCore.so

and found someone else with the same issue:
http://paste.lisp.org/display/117941

The good news is that I seem to have gotten the X-based backend to work, sortof. I&#039;m not seeing the menus. 

I&#039;m installing wxPython to try it with that...</description>
		<content:encoded><![CDATA[<p>The above was using python2.6 from the Fink install. When I use the Mac Python, I can &#8216;import Standard&#8217; successfully, but when I get to the PyQt part:</p>
<p>&gt;&gt;&gt; from PyQt4.QtCore import *<br />
Traceback (most recent call last):<br />
  File &#8220;&#8221;, line 1, in<br />
ImportError: dlopen(PyQt4/QtCore.so, 2): Symbol not found: __PyByteArray_empty_string<br />
  Referenced from: /sw64/lib/qt4-x11/lib/python2.6/site-packages/PyQt4/QtCore.so<br />
  Expected in: flat namespace<br />
 in /sw64/lib/qt4-x11/lib/python2.6/site-packages/PyQt4/QtCore.so</p>
<p>and found someone else with the same issue:<br />
<a href="http://paste.lisp.org/display/117941" rel="nofollow">http://paste.lisp.org/display/117941</a></p>
<p>The good news is that I seem to have gotten the X-based backend to work, sortof. I&#8217;m not seeing the menus. </p>
<p>I&#8217;m installing wxPython to try it with that&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benjamin Nortier</title>
		<link>http://www.pythonocc.org/resources/build_install/use-pythonocc-with-pyqt4-under-macosx-snow-leopard-10-6/comment-page-1/#comment-3263</link>
		<dc:creator>Benjamin Nortier</dc:creator>
		<pubDate>Fri, 07 Jan 2011 09:43:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythonocc.org/blog/?p=160#comment-3263</guid>
		<description>Thanks for the reply, much appreciated.

I have managed to build OCC from scratch (using the &#039;0.4&#039; tag), but the error I get is the same, &#039;Fatal Python error: Interpreter not initialized (version mismatch?)&#039;

And per you instruction:

$python2.6
Python 2.6.6 (r266:84292, Jan  6 2011, 17:38:55) 
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
&gt;&gt;&gt; import Standard
Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap</description>
		<content:encoded><![CDATA[<p>Thanks for the reply, much appreciated.</p>
<p>I have managed to build OCC from scratch (using the &#8217;0.4&#8242; tag), but the error I get is the same, &#8216;Fatal Python error: Interpreter not initialized (version mismatch?)&#8217;</p>
<p>And per you instruction:</p>
<p>$python2.6<br />
Python 2.6.6 (r266:84292, Jan  6 2011, 17:38:55)<br />
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin<br />
Type &#8220;help&#8221;, &#8220;copyright&#8221;, &#8220;credits&#8221; or &#8220;license&#8221; for more information.<br />
&gt;&gt;&gt; import Standard<br />
Fatal Python error: Interpreter not initialized (version mismatch?)<br />
Abort trap</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Paviot</title>
		<link>http://www.pythonocc.org/resources/build_install/use-pythonocc-with-pyqt4-under-macosx-snow-leopard-10-6/comment-page-1/#comment-3261</link>
		<dc:creator>Thomas Paviot</dc:creator>
		<pubDate>Fri, 07 Jan 2011 05:28:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythonocc.org/blog/?p=160#comment-3261</guid>
		<description>@Benjamin Download/extract the file pythonOCC-0.4-MacOSX-SL-64.zip. The folder &#039;OCC&#039; is then available from your &#039;Download&#039; directory. cd to that directory and to the following:

&lt;code&gt;
macbook-pro-de-thomas-paviot:OCC thomas$ pwd
/Users/thomas/Downloads/OCC
macbook-pro-de-thomas-paviot:OCC thomas$ python
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
&gt;&gt;&gt; import Standard
&gt;&gt;&gt;
&lt;/code&gt;

Can you paste the python trace?</description>
		<content:encoded><![CDATA[<p>@Benjamin Download/extract the file pythonOCC-0.4-MacOSX-SL-64.zip. The folder &#8216;OCC&#8217; is then available from your &#8216;Download&#8217; directory. cd to that directory and to the following:</p>
<p><code><br />
macbook-pro-de-thomas-paviot:OCC thomas$ pwd<br />
/Users/thomas/Downloads/OCC<br />
macbook-pro-de-thomas-paviot:OCC thomas$ python<br />
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)<br />
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin<br />
Type "help", "copyright", "credits" or "license" for more information.<br />
>>> import Standard<br />
>>><br />
</code></p>
<p>Can you paste the python trace?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Paviot</title>
		<link>http://www.pythonocc.org/resources/build_install/use-pythonocc-with-pyqt4-under-macosx-snow-leopard-10-6/comment-page-1/#comment-3260</link>
		<dc:creator>Thomas Paviot</dc:creator>
		<pubDate>Fri, 07 Jan 2011 05:14:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythonocc.org/blog/?p=160#comment-3260</guid>
		<description>@Benjamin Weird that you didn&#039;t manage to get the OSX binaries run on your machine. They&#039;re provided to avoid users compiling the whole project, which can be quite a long process. You need to run python (2.6) in 64bit mode, which should be the default configuration of python under OSX. To ensure that you do run the correct version, you should have the following ouput:
&lt;code&gt;
macbook-pro-de-thomas-paviot:lib thomas$ python
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
&gt;&gt;&gt; from sys import maxint
&gt;&gt;&gt; maxint
9223372036854775807
&lt;/code&gt;

My OpenCASCADE installation already have symlinks to *.0.dylib libraries:

&lt;code&gt;
macbook-pro-de-thomas-paviot:lib thomas$ pwd
/Library/OpenCASCADE/6.3.0/lib
macbook-pro-de-thomas-paviot:lib thomas$ ls -l libwokutilscmd*
lrwxr-xr-x  1 root  admin     22 Sep 28  2009 libwokutilscmd.0.0.0.dylib -&gt; libwokutilscmd.0.dylib
-rwxr-xr-x  1 root  admin  10480 Sep 28  2009 libwokutilscmd.0.dylib
lrwxr-xr-x  1 root  admin     22 Sep 28  2009 libwokutilscmd.dylib -&gt; libwokutilscmd.0.dylib
&lt;/code&gt;

Maybe I have to rebuild a package for the OpenCascade library.</description>
		<content:encoded><![CDATA[<p>@Benjamin Weird that you didn&#8217;t manage to get the OSX binaries run on your machine. They&#8217;re provided to avoid users compiling the whole project, which can be quite a long process. You need to run python (2.6) in 64bit mode, which should be the default configuration of python under OSX. To ensure that you do run the correct version, you should have the following ouput:<br />
<code><br />
macbook-pro-de-thomas-paviot:lib thomas$ python<br />
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)<br />
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin<br />
Type "help", "copyright", "credits" or "license" for more information.<br />
>>> from sys import maxint<br />
>>> maxint<br />
9223372036854775807<br />
</code></p>
<p>My OpenCASCADE installation already have symlinks to *.0.dylib libraries:</p>
<p><code><br />
macbook-pro-de-thomas-paviot:lib thomas$ pwd<br />
/Library/OpenCASCADE/6.3.0/lib<br />
macbook-pro-de-thomas-paviot:lib thomas$ ls -l libwokutilscmd*<br />
lrwxr-xr-x  1 root  admin     22 Sep 28  2009 libwokutilscmd.0.0.0.dylib -> libwokutilscmd.0.dylib<br />
-rwxr-xr-x  1 root  admin  10480 Sep 28  2009 libwokutilscmd.0.dylib<br />
lrwxr-xr-x  1 root  admin     22 Sep 28  2009 libwokutilscmd.dylib -> libwokutilscmd.0.dylib<br />
</code></p>
<p>Maybe I have to rebuild a package for the OpenCascade library.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benjamin Nortier</title>
		<link>http://www.pythonocc.org/resources/build_install/use-pythonocc-with-pyqt4-under-macosx-snow-leopard-10-6/comment-page-1/#comment-3256</link>
		<dc:creator>Benjamin Nortier</dc:creator>
		<pubDate>Fri, 07 Jan 2011 00:42:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythonocc.org/blog/?p=160#comment-3256</guid>
		<description>After adding symlinks, e.g.
libwokutilscmd.dylib -&gt; libwokutilscmd.0.dylib

it is building now...
(holding thumbs)</description>
		<content:encoded><![CDATA[<p>After adding symlinks, e.g.<br />
libwokutilscmd.dylib -&gt; libwokutilscmd.0.dylib</p>
<p>it is building now&#8230;<br />
(holding thumbs)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benjamin Nortier</title>
		<link>http://www.pythonocc.org/resources/build_install/use-pythonocc-with-pyqt4-under-macosx-snow-leopard-10-6/comment-page-1/#comment-3255</link>
		<dc:creator>Benjamin Nortier</dc:creator>
		<pubDate>Thu, 06 Jan 2011 23:51:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythonocc.org/blog/?p=160#comment-3255</guid>
		<description>After much to-and-fro, I&#039;ve managed to install qt-x11 (4.6.3-1) and pyqt4 (4.7.4-1), all with Fink. But when trying to run the samples I get:

Fatal Python error: Interpreter not initialized (version mismatch?)

I suspect this is because the PythonOCC I downloaded (pythonOCC-0.4-MacOSX-SL-64.zip), was built with a different version of... (?). So I tried to rebuild PythonOCC as per the INSTALL instructions in the source code, but 

$python2.6 setup.py build
...
g++ -F. --no_undefined -bundle -dynamic_lookup -arch x86_64 -m64 -L. -lm -lstdc++ -lpython2.6 build/temp.macosx-10.6-x86_64-2.6/Users/bjnortier/development/pythonocc-read-only/src/wrapper/SWIG/linux_darwin/Standard_wrap.o -L/Library/OpenCASCADE/6.3.0/lib -L/usr/local/lib -L/usr/local/lib -lBinLPlugin -lBinPlugin -lBinXCAFPlugin -lFWOSPlugin -lPTKernel -lStdLPlugin -lStdPlugin -lTKAdvTools -lTKBin -lTKBinL -lTKBinTObj -lTKBinXCAF -lTKBO -lTKBool -lTKBRep -lTKCAF -lTKCDF -lTKernel -lTKFeat -lTKFillet -lTKG2d -lTKG3d -lTKGeomAlgo -lTKGeomBase -lTKHLR -lTKIGES -lTKLCAF -lTKMath -lTKMesh -lTKMeshVS -lTKNIS -lTKOffset -lTKOpenGl -lTKPCAF -lTKPLCAF -lTKPrim -lTKPShape -lTKService -lTKShapeSchema -lTKShHealing -lTKStdLSchema -lTKStdSchema -lTKSTEP -lTKSTEP209 -lTKSTEPAttr -lTKSTEPBase -lTKSTL -lTKTObj -lTKTopAlgo -lTKV2d -lTKV3d -lTKVRML -lTKXCAF -lTKXCAFSchema -lTKXDEIGES -lTKXDESTEP -lTKXMesh -lTKXml -lTKXmlL -lTKXmlTObj -lTKXmlXCAF -lTKXSBase -lXCAFPlugin -lXmlLPlugin -lXmlPlugin -lXmlXCAFPlugin -o build/lib.macosx-10.6-x86_64-2.6/OCC/_Standard.so
ld: library not found for -lBinLPlugin
collect2: ld returned 1 exit status

Any ideas?</description>
		<content:encoded><![CDATA[<p>After much to-and-fro, I&#8217;ve managed to install qt-x11 (4.6.3-1) and pyqt4 (4.7.4-1), all with Fink. But when trying to run the samples I get:</p>
<p>Fatal Python error: Interpreter not initialized (version mismatch?)</p>
<p>I suspect this is because the PythonOCC I downloaded (pythonOCC-0.4-MacOSX-SL-64.zip), was built with a different version of&#8230; (?). So I tried to rebuild PythonOCC as per the INSTALL instructions in the source code, but </p>
<p>$python2.6 setup.py build<br />
&#8230;<br />
g++ -F. &#8211;no_undefined -bundle -dynamic_lookup -arch x86_64 -m64 -L. -lm -lstdc++ -lpython2.6 build/temp.macosx-10.6-x86_64-2.6/Users/bjnortier/development/pythonocc-read-only/src/wrapper/SWIG/linux_darwin/Standard_wrap.o -L/Library/OpenCASCADE/6.3.0/lib -L/usr/local/lib -L/usr/local/lib -lBinLPlugin -lBinPlugin -lBinXCAFPlugin -lFWOSPlugin -lPTKernel -lStdLPlugin -lStdPlugin -lTKAdvTools -lTKBin -lTKBinL -lTKBinTObj -lTKBinXCAF -lTKBO -lTKBool -lTKBRep -lTKCAF -lTKCDF -lTKernel -lTKFeat -lTKFillet -lTKG2d -lTKG3d -lTKGeomAlgo -lTKGeomBase -lTKHLR -lTKIGES -lTKLCAF -lTKMath -lTKMesh -lTKMeshVS -lTKNIS -lTKOffset -lTKOpenGl -lTKPCAF -lTKPLCAF -lTKPrim -lTKPShape -lTKService -lTKShapeSchema -lTKShHealing -lTKStdLSchema -lTKStdSchema -lTKSTEP -lTKSTEP209 -lTKSTEPAttr -lTKSTEPBase -lTKSTL -lTKTObj -lTKTopAlgo -lTKV2d -lTKV3d -lTKVRML -lTKXCAF -lTKXCAFSchema -lTKXDEIGES -lTKXDESTEP -lTKXMesh -lTKXml -lTKXmlL -lTKXmlTObj -lTKXmlXCAF -lTKXSBase -lXCAFPlugin -lXmlLPlugin -lXmlPlugin -lXmlXCAFPlugin -o build/lib.macosx-10.6-x86_64-2.6/OCC/_Standard.so<br />
ld: library not found for -lBinLPlugin<br />
collect2: ld returned 1 exit status</p>
<p>Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Boeykens</title>
		<link>http://www.pythonocc.org/resources/build_install/use-pythonocc-with-pyqt4-under-macosx-snow-leopard-10-6/comment-page-1/#comment-242</link>
		<dc:creator>Stefan Boeykens</dc:creator>
		<pubDate>Thu, 11 Mar 2010 07:59:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythonocc.org/blog/?p=160#comment-242</guid>
		<description>It was indeed close... after creating a symbolic link inside the site-packages folder from the system Python 2.6 to the PyQt4 package inside the fink-provided Python 2.6, all fell into place.

So I can now say that I finally can run PythonOCC with Qt (X11) as a backend for GUI. Now the next step is the wxWidgets stuff...</description>
		<content:encoded><![CDATA[<p>It was indeed close&#8230; after creating a symbolic link inside the site-packages folder from the system Python 2.6 to the PyQt4 package inside the fink-provided Python 2.6, all fell into place.</p>
<p>So I can now say that I finally can run PythonOCC with Qt (X11) as a backend for GUI. Now the next step is the wxWidgets stuff&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

