[Qgis-developer] newbie build, run question
Arnaud Morvan
arnaud.morvan at camptocamp.com
Fri Feb 10 01:59:42 PST 2017
Hello Chris,
QgsMapLayerRegistry does not exist anymore (since some weeks).
It's methods have been moved to QgsProject to allow having multiple
project open at the same time.
So the GdalTools plugin does not seems up to date or compatible with
current master branch of QGIS.
I'm not really aware of that plugin, but I do not see it in QGIS core
repository.
Maybe this is an obsolete thing, and you could just remove it.
Have you followed the install doc :
https://github.com/qgis/QGIS/blob/master/INSTALL
For using custom build of QGIS, you should :
Change CMAKE_INSTALL_PREFIX to some folder in your home instead of
default one in system folder
https://github.com/qgis/QGIS/blob/master/INSTALL#L256
And run QGIS using :
export QGIS_PREFIX_PATH=~/apps/qgis-master
export LD_LIBRARY_PATH=$QGIS_PREFIX_PATH/lib
$QGIS_PREFIX_PATH/bin/qgis
With a fresh build/install you should not get this error.
Cheers
Arnaud Morvan
Ingénieur logiciel
Tél: +33 (0)4 58 48 20 32
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac Cedex
http://www.camptocamp.com
Le 10/02/2017 à 04:39, Chris Nicholas a écrit :
> I successfully built (or so it appeared from cmake…) QGIS from source
> on Linux according to the instructions of:
> https://github.com/qgis/QGIS/blob/final-2_18_3/INSTALL
>
> (….
> [100%] Built target qgis_fieldcalculatortest_automoc
> [100%] Built target qgis_fieldcalculatortest
> [100%] Built target qgis_bench
> *cgn at cgn-VirtualBox*:*~/src/QGIS/build-master*$
> …)
>
> after make install, now trying to run qgis:
>
> *cgn at cgn-VirtualBox*:*~/src/QGIS/build-master*$ which qgis
> /usr/local/bin/qgis
>
>
> , but I get the following error message …. I’ve looked everywhere but
> can’t find this stuff … where might it be?
>
> advise/RTFMs/etc welcomed…
>
> thanks!!!
> Chris
>
> ——————————————
>
> Couldn't load plugin GdalTools due to an error when calling its
> initGui() method
>
> ImportError: cannot import name 'QgsMapLayerRegistry'
> Traceback (most recent call last):
> File "/usr/local/share/qgis/python/qgis/utils.py", line 347, in
> startPlugin
> plugins[packageName].initGui()
> File "/usr/local/share/qgis/python/plugins/GdalTools/GdalTools.py",
> line 106, in initGui
> from .tools.GdalTools_utils import GdalConfig, LayerRegistry
> File "/usr/local/share/qgis/python/qgis/utils.py", line 647, in _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> File
> "/usr/local/share/qgis/python/plugins/GdalTools/tools/GdalTools_utils.py",
> line 40, in
> from qgis.core import QgsApplication, QgsMapLayerRegistry,
> QgsRectangle, QgsProviderRegistry, QgsLogger, QgsProject
> ImportError: cannot import name 'QgsMapLayerRegistry'
>
>
> Python version: 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0
> 20160609]
> QGIS version: 2.99.0-Master Master, 2c188b2
>
> Python Path:
> /usr/local/share/qgis/python
> /home/cgn/.qgis3/python
> /home/cgn/.qgis3/python/plugins
> /usr/local/share/qgis/python/plugins
> /usr/local/share/qgis/python/qgis
> /home/cgn/src/QGIS/build-master/python
> /usr/lib/python35.zip
> /usr/lib/python3.5
> /usr/lib/python3.5/plat-x86_64-linux-gnu
> /usr/lib/python3.5/lib-dynload
> /usr/local/lib/python3.5/dist-packages
> /usr/lib/python3/dist-packages
> /home/cgn/.qgis3//python
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170210/43977d4b/attachment.html>
More information about the Qgis-developer
mailing list