环境配置 eclipse+pydev+python27 + pyqt4.8.6 + qgis2.6
eclipse安装。略
pydev安装。略
python27安装。略。
pyqt4.8.6 + qgis2.6安装。我用的是OSGeo4W安装包,OSGeo4W本身自带qgis2.6开发组件 和 pyqt4.8.6开发组件, python27也会自带, python27最好自行安装个。注意用OSGeo4W安装后,不要在单独安装pyqt了,
注意事项:
qgis.core dll not found: 是环境变量设置造成的,但是此处不能直接在 PATH 中增加环境变量,增加后你会发现其实是无作用的。正确的做法是C:\OSGeo4W\bin 增加一个bat 文件文件 通过bat 文件设置你的环境变量,并且启动eclipse.exe
pydevqgis.bat:
@echo off
call "%~dp0\o4w_env.bat"
@echo off
path %OSGEO4W_ROOT%\apps\qgis\bin;%PATH%
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/qgis
rem Set VSI cache to be used as buffer, see #6448
set VSI_CACHE=TRUE
set VSI_CACHE_SIZE=1000000
set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\qgis\qtplugins;%OSGEO4W_ROOT%\apps\qt4\plugins
D:\andr_dev\eclipse\eclipse.exebat文件的 最后一行是eclipse 的路径,换成你自己的即可,其余的不用改变。
启动eclipse的时候,直接双击pydevqgis.bat,然后就可以顺顺的coding了。因为 qgis.core dll not found 花了我很长时间在google上搜索,差点要放弃pyqt qgis的开发方式。问题的解决方法还是有的,除非你没有发现相关的成功案例。