Re: [Qgis-developer] Do Python plugins already work with QGIS 3?

2016-12-14 Thread Jürgen E . Fischer
Hi Andreas,

On Tue, 13. Dec 2016 at 15:51:26 +0100, Andreas Neumann wrote:
> I compiled and installed QGIS 3 - which worked fine.

BTW for debian and ubuntu there nightlies builds in
http://qgis.org/debian-nightly.


Jürgen

-- 
Jürgen E. Fischer   norBIT GmbH Tel. +49-4931-918175-31
Dipl.-Inf. (FH) Rheinstraße 13  Fax. +49-4931-918175-50
Software Engineer   D-26506 Norden http://www.norbit.de
QGIS release manager (PSC)  GermanyIRC: jef on FreeNode 



pgpgPweAAlAgx.pgp
Description: PGP signature
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Do Python plugins already work with QGIS 3?

2016-12-13 Thread Andreas Neumann

ah - yes, now it works after Martins fix.

So a side-effect of your refactoring.

No problem

Thanks all who gave me hints. I should be fine now.

Andreas


On 13.12.2016 17:21, Martin Dobias wrote:

On Wed, Dec 14, 2016 at 12:00 AM, Andreas Neumann  wrote:

However, db manager still fails to start with error message:

--

2016-12-13T16:53:211Traceback (most recent call last):
   File
"/usr/local/share/qgis/python/plugins/db_manager/db_manager_plugin.py", line
108, in run
 from .db_manager import DBManager
   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/db_manager/db_manager.py", line 36, in

 from .layer_preview import LayerPreview
   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/db_manager/layer_preview.py", line 27,
in 
 from qgis.gui import QgsMapCanvas, QgsMapCanvasLayer,
QgsMessageBar
 ImportError: cannot import name 'QgsMapCanvasLayer'

My bad - should be fixed now in latest master.

Cheers
Martin


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Do Python plugins already work with QGIS 3?

2016-12-13 Thread Martin Dobias
On Wed, Dec 14, 2016 at 12:00 AM, Andreas Neumann  wrote:
>
> However, db manager still fails to start with error message:
>
> --
>
> 2016-12-13T16:53:211Traceback (most recent call last):
>   File
> "/usr/local/share/qgis/python/plugins/db_manager/db_manager_plugin.py", line
> 108, in run
> from .db_manager import DBManager
>   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/db_manager/db_manager.py", line 36, in
> 
> from .layer_preview import LayerPreview
>   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/db_manager/layer_preview.py", line 27,
> in 
> from qgis.gui import QgsMapCanvas, QgsMapCanvasLayer,
> QgsMessageBar
> ImportError: cannot import name 'QgsMapCanvasLayer'

My bad - should be fixed now in latest master.

Cheers
Martin
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Do Python plugins already work with QGIS 3?

2016-12-13 Thread Andreas Neumann
yes - I used the instructions from 
https://github.com/qgis/QGIS/blob/master/INSTALL


but all "geo" libraries (geos, gdal, spatialite, postgres/postgis) had 
been installed from source.


Is there a dependency python module list for db manager available?

python3-psycopg is installed. Any other SQL modules or other modules the 
DB manager requires?


Andreas


On 13.12.2016 17:02, Paolo Cavallini wrote:

Il 13/12/2016 17:00, Andreas Neumann ha scritto:


Can you confirm that DB-manager should work fine with the latest master?

I confirm. Probably other py3 packages are missing.
Did you insall what is in the requirements?
All the best.



___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Do Python plugins already work with QGIS 3?

2016-12-13 Thread Paolo Cavallini
Il 13/12/2016 17:00, Andreas Neumann ha scritto:

> Can you confirm that DB-manager should work fine with the latest master?

I confirm. Probably other py3 packages are missing.
Did you insall what is in the requirements?
All the best.

-- 
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
https://www.google.com/trends/explore?date=all=IT=qgis,arcgis
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Do Python plugins already work with QGIS 3?

2016-12-13 Thread Andreas Neumann

Hi Marco,

Thanks - this helped a lot. Apparently it was the missing python3-gdal 
bindings. I only had the bindings for python2. Processing now seems to 
work fine (at least the few tests I did).


However, db manager still fails to start with error message:

--

2016-12-13T16:53:211Traceback (most recent call last):
  File 
"/usr/local/share/qgis/python/plugins/db_manager/db_manager_plugin.py", 
line 108, in run

from .db_manager import DBManager
  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/db_manager/db_manager.py", line 
36, in 

from .layer_preview import LayerPreview
  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/db_manager/layer_preview.py", line 
27, in 
from qgis.gui import QgsMapCanvas, QgsMapCanvasLayer, 
QgsMessageBar

ImportError: cannot import name 'QgsMapCanvasLayer'

--

Can you confirm that DB-manager should work fine with the latest master?

Thanks,

Andreas


On 13.12.2016 16:40, Marco Bernasocchi wrote:

could be,
it could also be a PYTHONPATH issue depenndign where you installed the
bindings.

can you import them in a python prompt?

to build gdal with python 3 you need to do some thing like:
cd gdal/swig/python
python3 setup.py build & python3 setup.py install

IIRC gdal compiles in its source dir so for qgis for android I just used
to copy the whole GDAL folder before building to keep a clean copy.

more info:
https://trac.osgeo.org/gdal/wiki/GdalOgrInPython
https://trac.osgeo.org/gdal/wiki/BuildingOnUnix

ciao
Marco


On 13.12.2016 16:23, Andreas Neumann wrote:

Hi,

I get a message:



Unable to load GdalTools plugin.

The required "osgeo [python-gdal]" module is missing.

Install it and try again.





then there is a new error message:


--


ImportError: No module named 'osgeo'


--


I installed gdal from source, but enabled Python and also enabled shared
libraries.


Could it be that gdal was compiled with Python 2 while QGIS runs with
Python 3?


If that's the case, how can i compile GDAL with Python 3 support?


Can I compile gdal with Python 2 and 3 support if I want QGIS 2.x and
3.x on the same machine?

Thanks,
Andreas

On 13.12.2016 15:55, Tom Chadwin wrote:

Define "fail", I guess. Most plugins won't work without modification
[citation needed], but it would be good to know *how* it fails, as you are
right that there could be a more general issue.



-
Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon
--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Do-Python-plugins-already-work-with-QGIS-3-tp5299693p5299694.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer



___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer



___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Do Python plugins already work with QGIS 3?

2016-12-13 Thread Marco Bernasocchi
could be,
it could also be a PYTHONPATH issue depenndign where you installed the
bindings.

can you import them in a python prompt?

to build gdal with python 3 you need to do some thing like:
cd gdal/swig/python
python3 setup.py build & python3 setup.py install

IIRC gdal compiles in its source dir so for qgis for android I just used
to copy the whole GDAL folder before building to keep a clean copy.

more info:
https://trac.osgeo.org/gdal/wiki/GdalOgrInPython
https://trac.osgeo.org/gdal/wiki/BuildingOnUnix

ciao
Marco


On 13.12.2016 16:23, Andreas Neumann wrote:
> Hi,
> 
> I get a message:
> 
> 
> 
> Unable to load GdalTools plugin.
> 
> The required "osgeo [python-gdal]" module is missing.
> 
> Install it and try again.
> 
> 
> 
> 
> 
> then there is a new error message:
> 
> 
> --
> 
> 
> ImportError: No module named 'osgeo'
> 
> 
> --
> 
> 
> I installed gdal from source, but enabled Python and also enabled shared
> libraries.
> 
> 
> Could it be that gdal was compiled with Python 2 while QGIS runs with
> Python 3?
> 
> 
> If that's the case, how can i compile GDAL with Python 3 support?
> 
> 
> Can I compile gdal with Python 2 and 3 support if I want QGIS 2.x and
> 3.x on the same machine?
> 
> Thanks,
> Andreas
> 
> On 13.12.2016 15:55, Tom Chadwin wrote:
>> Define "fail", I guess. Most plugins won't work without modification
>> [citation needed], but it would be good to know *how* it fails, as you are
>> right that there could be a more general issue.
>>
>>
>>
>> -
>> Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon 
>> --
>> View this message in context: 
>> http://osgeo-org.1560.x6.nabble.com/Do-Python-plugins-already-work-with-QGIS-3-tp5299693p5299694.html
>> Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 
> 
> 
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 

-- 
Marco Bernasocchi
OPENGIS.ch - berna.io - 27summits.ch



signature.asc
Description: OpenPGP digital signature
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Do Python plugins already work with QGIS 3?

2016-12-13 Thread Andreas Neumann

Hi,

I get a message:



Unable to load GdalTools plugin.

The required "osgeo [python-gdal]" module is missing.

Install it and try again.





then there is a new error message:


--


ImportError: No module named 'osgeo'


--


I installed gdal from source, but enabled Python and also enabled shared 
libraries.



Could it be that gdal was compiled with Python 2 while QGIS runs with 
Python 3?



If that's the case, how can i compile GDAL with Python 3 support?


Can I compile gdal with Python 2 and 3 support if I want QGIS 2.x and 
3.x on the same machine?


Thanks,
Andreas

On 13.12.2016 15:55, Tom Chadwin wrote:

Define "fail", I guess. Most plugins won't work without modification
[citation needed], but it would be good to know *how* it fails, as you are
right that there could be a more general issue.



-
Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon
--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Do-Python-plugins-already-work-with-QGIS-3-tp5299693p5299694.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Do Python plugins already work with QGIS 3?

2016-12-13 Thread Marco Bernasocchi
well, for once most plugins will fail at from PyQt4 import *, then they
could fail at any API break.

the core plugins go trough 2to3
(https://github.com/qgis/QGIS/blob/master/scripts/2to3) that should
fixup most of the problems.

on ubuntu 16.10 DBman and processing work.

If you are porting a plugin to QGIS3 I suggest you to have a look at the
qgis2compat plugin which will make your life much easier in keeping a
plugin working wut the QGIS 2 and 3 API.

www.opengis.ch/qgis2compat

ciao
Marco

On 13.12.2016 15:55, Tom Chadwin wrote:
> Define "fail", I guess. Most plugins won't work without modification
> [citation needed], but it would be good to know *how* it fails, as you are
> right that there could be a more general issue.
> 
> 
> 
> -
> Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon 
> --
> View this message in context: 
> http://osgeo-org.1560.x6.nabble.com/Do-Python-plugins-already-work-with-QGIS-3-tp5299693p5299694.html
> Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 

-- 
Marco Bernasocchi
OPENGIS.ch - berna.io - 27summits.ch



signature.asc
Description: OpenPGP digital signature
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Do Python plugins already work with QGIS 3?

2016-12-13 Thread Richard Duivenvoorde

On 12/13/2016 03:51 PM, Andreas Neumann wrote:

Hi,

I compiled and installed QGIS 3 - which worked fine. But at start of
QGIS, none of the Python plugins seem to work, e.g. processing,
db-manager, etc. all fail.

Is this expected behaviour or is there something in my compile settings
that would make these Python "core" plugins work in QGIS 3.0 on Python 3?


During compilation there is (was?) a script which fixed python2 lingua 
to python3 (scripts/2to3). You need python3 future for that (on Debian):


pip3 install future

Maybe during your compilation/installation this step failed?

There are also some plugins already (preliminary, as api can still 
change) ported to 3:


https://plugins.qgis.org/plugins/plugins.xml?qgis=3.0

The Core plugins you name, work here with me on Debian testing.

Regards,

Richard


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Do Python plugins already work with QGIS 3?

2016-12-13 Thread Mathieu Pellerin
Processing and db manager works under QGIS. What are the error messages you
get? I d suspect missing Python 3 modules/packages being problem here.

On Dec 13, 2016 21:51, "Andreas Neumann"  wrote:

> Hi,
>
> I compiled and installed QGIS 3 - which worked fine. But at start of QGIS,
> none of the Python plugins seem to work, e.g. processing, db-manager, etc.
> all fail.
>
> Is this expected behaviour or is there something in my compile settings
> that would make these Python "core" plugins work in QGIS 3.0 on Python 3?
>
> Thanks,
>
> Andreas
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Do Python plugins already work with QGIS 3?

2016-12-13 Thread Paolo Cavallini
Il 13/12/2016 15:51, Andreas Neumann ha scritto:
> Hi,
> 
> I compiled and installed QGIS 3 - which worked fine. But at start of
> QGIS, none of the Python plugins seem to work, e.g. processing,
> db-manager, etc. all fail.

Processing etc. working here on master.
All the best.

-- 
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
https://www.google.com/trends/explore?date=all=IT=qgis,arcgis
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Do Python plugins already work with QGIS 3?

2016-12-13 Thread Tom Chadwin
Define "fail", I guess. Most plugins won't work without modification
[citation needed], but it would be good to know *how* it fails, as you are
right that there could be a more general issue.



-
Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon 
--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Do-Python-plugins-already-work-with-QGIS-3-tp5299693p5299694.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer