<div>Thanks Martin,<br></div><div><br></div><div>In mean time I switched to python 2.5 and I succeed to include qgis libraries.</div><div><br></div><div>I wanted to be independent from OSGeo4 because when I wanted to use pyDev for debugging code, I couldnt use python.exe interpreter from OSGeo4 installation folder. I got some strange errors when I wante to reference to python.exe.</div>
<div>Also another problem was that I used unstable version of OSGeo4, so maybe that caused also problems. Just thinking...</div><div><br></div><div>Anyway, thx a lot for answer</div><div><br></div><div>Cheers</div><div><br>
</div><div>Minja</div><div><br></div><br><div class="gmail_quote">On Fri, Jul 16, 2010 at 1:03 PM, Martin Dobias <span dir="ltr"><<a href="http://wonder.sk">wonder.sk</a>@<a href="http://gmail.com">gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Minja<br>
<div class="im"><br>
On Fri, Jul 9, 2010 at 10:19 AM, Minja <<a href="mailto:msiljegovic@gmail.com">msiljegovic@gmail.com</a>> wrote:<br>
> Im trying to create standalone python application that will use PyQT4<br>
> libraries and QGIS libriaries. I installed first python 3.1 and tested it in<br>
> console and Eclipse PyDev enviroment. It worked fine....then I installed<br>
> PyQt GPL v4.7.3 for Python 3.1, tested import of those libraries and<br>
> everything worked fine on both console and eclipse enviroment.<br>
><br>
> My next step was to try to use qgis libraries and I followed tutorial from<br>
> this site <a href="http://mapserver.sk/~wonder/qgis/html/intro.html" target="_blank">http://mapserver.sk/~wonder/qgis/html/intro.html</a> to configure<br>
> enviroment variables for using PyQGIS in my standalone application. But when<br>
> I test "from qgis.core import *" Im getting error message "from qgis.core<br>
> import * ImportError: DLL load failed: The specified procedure could not be<br>
> found" all the time.<br>
<br>
</div>Python binding shipped with QGIS (both OSGeo4W and standalone) are<br>
compiled against Python 2.x releases, so don't expect that it will<br>
work with Python 3. Please use Python 2 and I _strongly_ recommend you<br>
to use Python from OSGeo4W installation to prevent further troubles.<br>
<br>
You _may_ have some success with Python 3 if you compiled QGIS with<br>
bindings from source code, though the procedure might require some<br>
tweaking and so far I am not aware of any effort in order to compile<br>
and run QGIS with Python 3. At some point of time in future, QGIS will<br>
use Python 3 by default, but nowadays everyone still uses Python 2.x.<br>
<div class="im"><br>
<br>
<br>
> Here is how mine enviroment variables are set<br>
> PYTHONPATH:<br>
> C:\Python31\Lib\site-packages;C:\OSGeo4W\apps\qgis-unstable\python;<br>
> PATH: C:\OSGeo4W\apps\qgis-unstable;C:\Python31\Lib\site-packages\PyQt4\bin;<br>
> I also tried with options to set following paths in<br>
> PATH C:\OSGeo4W\apps\qgis-unstable\bin;C:\OSGeo4W\apps\qgis-unstable\lib;<br>
> I read a lot about this on internet and forums, I also saw comments that I<br>
> should use python and PyQt installation that comes with QGIS(version 1.4.0)(<br>
> I tried that running OSGeo4W shell and it worked), but I think it would be<br>
> better to dont be dependent directly to OSGeo installation...I would like<br>
> only to use QGIS librarires same as it is happenning with PyQT4.<br>
<br>
</div>I don't understand why you try to be independent from the OSGeo4W<br>
installation. Having all the libraries in place (and working well) is<br>
a huge advantage of OSGeo4W. If you do that to ensure that you don't<br>
have to carry the whole OSGeo4W installation with your custom<br>
application, then don't worry. You can simply copy only necessary<br>
components (Python, SIP, PyQt4, QGIS and its dependencies) from it,<br>
just like you would do it otherwise anyway.<br>
<br>
Regards<br>
<font color="#888888">Martin<br>
</font></blockquote></div><br>