[Qgis-user] spatial analysis toolbox - testing for autocorrelation

Francesca Parente francescaparente.rse at gmail.com
Fri Aug 18 01:04:40 PDT 2023


Thanks again Thayer,
I tried the first option and updated to 3.28.9 Firenze, but when I run it I
get the following multiple errors (I don't know if they're the same kind
you were getting with OSGeo4W installer):




















*2023-08-18T09:43:26     CRITICAL    Traceback (most recent call last):
          File
"C:\PROGRA~1/QGIS32~1.9/apps/qgis-ltr/./python\qgis\utils.py", line 423, in
_startPlugin              plugins[packageName] =
package.classFactory(iface)              File
"C:\Users/fparente/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\spatialanalysistoolbox\__init__.py",
line 36, in classFactory              from .spatialanalysistoolbox import
SpatialAnalysisToolboxPlugin              File
"C:\PROGRA~1/QGIS32~1.9/apps/qgis-ltr/./python\qgis\utils.py", line 888, in
_import              mod = _builtin_import(name, globals, locals, fromlist,
level)              File
"C:\Users/fparente/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\spatialanalysistoolbox\spatialanalysistoolbox.py",
line 38, in               from .spatialanalysistoolbox_provider import
SpatialAnalysisToolboxProvider              File
"C:\PROGRA~1/QGIS32~1.9/apps/qgis-ltr/./python\qgis\utils.py", line 888, in
_import              mod = _builtin_import(name, globals, locals, fromlist,
level)              File
"C:\Users/fparente/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\spatialanalysistoolbox\spatialanalysistoolbox_provider.py",
line 35, in               from .algorithms.GWR_ import GWR_
File "C:\PROGRA~1/QGIS32~1.9/apps/qgis-ltr/./python\qgis\utils.py", line
888, in _import              mod = _builtin_import(name, globals, locals,
fromlist, level)              File
"C:\Users/fparente/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\spatialanalysistoolbox\algorithms\GWR_.py",
line 26, in               from mgwr.gwr import GWR              File
"C:\PROGRA~1/QGIS32~1.9/apps/qgis-ltr/./python\qgis\utils.py", line 888, in
_import              mod = _builtin_import(name, globals, locals, fromlist,
level)             ModuleNotFoundError: No module named 'mgwr'*

Also only now I get the sense that "python prompt" refers to an app called
Command Prompt, right? Apologies for any obvious question asked!

Maybe I'll try with the second option.
Thanks again, you and all others who gave their inputs!
Have a good day and a good weekend everyone,
Francesca


Il giorno lun 14 ago 2023 alle ore 16:40 Thayer Young <thayeray at yahoo.com>
ha scritto:

> Hi Francesca,
>
> Sorry for the confusion.
>
> FYI, I recently installed the 3.28 .msi QGIS from the QGIS.org website and
> geopandas is installed. You may just want to update your QGIS. I did not
> use the OSGeo4W installer, as that was giving me missing .dll errors.
>
> If you want to persist with your current install, I think you want to do
> the following:
>
> Open the 'Command Prompt' program (go to the start menu and search for it)
> When it opens you will this prompt:     C:\Users\your_user_name>   From
> file explorer drag and drop the 'python.exe' onto the Command Prompt
> window. It should list the path to the python.exe file. You then want to
> press enter. That should log you in to an interactive python terminal and
> change the prompt to '>>>'.    Type in:   import geopandas    and press
> enter. That should give you a 'ModuleNotFoundError'.
>
> If it does not give you an error and instead just goes to the next line,
> you know that geopandas is installed. You can enter: exit()  and press
> enter, and you can close the Command Prompt window.
>
> If you get the 'ModuleNotFoundError' error, press the up arrow and it
> should bring up the path to the python.exe file again.
> Then enter:   -m pip install geopandas  Then press enter.
> That should bring up a long list of installation stuff, hopefully none of
> it is red. You can then press the up arrow twice to get the path to the
> python.exe and press enter to start python. Then try importing geopandas
> again as above.
>
>
> https://gis.stackexchange.com/questions/346859/importing-geopandas-in-qgis-3
>
> -Thayer
>
>
>
> On Monday, August 14, 2023 at 05:58:31 AM EDT, Francesca Parente <
> francescaparente.rse at gmail.com> wrote:
>
>
> Thank you both! I checked that out and tried the suggested installing
> procedure.. but I can't get the command prompt where to type "pip install
> geopandas".
> I think I'm still missing a piece, I'm not so familiar with the python
> environment as you can assume.
>
> These are the steps I followed:
>
> [image: image.png]
> --->
> [image: image.png]
> Then I clicked on "python3.dll", which downloaded the file I tried to open
> - but got me just another error message in QGis (saying that is an invalid
> data source).
> I searched online for other tips and tutorials, but (besides another
> procedure using fiona) I haven't found anything more specific on this one.
>
> Should I go into the "Scripts" folder and click on "pip.exe" or "pip3.exe"?
> Thanks again for your time and any other inputs you may have!
> Francesca
>
>
> Il giorno ven 11 ago 2023 alle ore 19:20 Thayer Young via QGIS-User <
> qgis-user at lists.osgeo.org> ha scritto:
>
> Hi Francesca,
>
> If you don't know how to install Geopandas, I would like to add to what
> Paolo said. Geopandas needs to be installed in the python that QGIS is
> using.
> You can check the location of the python installation by going to the
> overall preferences for QGIS (command comma on a Mac, probably control
> comma on other systems.)
> From the System tab scroll to the bottom to find the "Current environment
> variables" scroll down to find PYTHONHOME.
> This documentation page shows you more with pictures:
>
> https://docs.qgis.org/3.28/en/docs/user_manual/introduction/qgis_configuration.html#system-settings
>
> Then in Finder or Explorer, etc. you want to find  location in the file
> system. On a Mac you will need to right click on QGIS in your applications
> folder and show package contents.  Then continue through the path and
> double click to open the python3 file.
> This will bring up a python prompt where you want to type:   pip install
> geopandas   Then press enter/return. It will run for a while and hopefully
> say that you successfully installed geopandas. You will probably need to
> restart QGIS after that.
>
> -Thayer
>
>
>
> On Thursday, August 10, 2023 at 03:00:37 PM EDT,
> qgis-user-request at lists.osgeo.org <qgis-user-request at lists.osgeo.org>
> wrote:
> ----------------------------------------------------------------------
> Date: Thu, 10 Aug 2023 17:29:39 +0300
> From: Paolo Cavallini <cavallini at faunalia.it>
> To: Francesca Parente <francescaparente.rse at gmail.com>, Francesca
>     Parente via QGIS-User <qgis-user at lists.osgeo.org>, QGIS User List
>     <qgis-user at lists.osgeo.org>
> Subject: Re: [Qgis-user] spatial analysis toolbox - testing for
>     autocorrelation
> Message-ID: <CA92BEAF-7DFA-479D-BF82-4614BF7DE30D at faunalia.it>
> Content-Type: text/plain; charset="utf-8"
>
> You have to install geopandas.
> Cheers.
>
> Il 10 agosto 2023 17:10:28 EEST, Francesca Parente via QGIS-User <
> qgis-user at lists.osgeo.org> ha scritto:
> >Hello everyone!
> >
> >I was wondering how to perform spatial autocorrelation tests in QGis and I
> >downloaded the Spatial Analysis Toolbox
> ><https://plugins.qgis.org/plugins/spatialanalysistoolbox/> plugin.
> >I can't even open it thought and immediately got the following error
> >message:
>
> >*Impossibile caricare il plugin 'spatialanalysistoolbox' a causa di un
> >errore chiamando il metodo classFactory() ModuleNotFoundError: No module
> >named 'geopandas' Traceback (most recent call last):  File
> >"C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 335, in _startPlugin
> >  plugins[packageName] = package.classFactory(iface)  File
>
> >"C:/Users/fparente/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\spatialanalysistoolbox\__init__.py",
> >line 36, in classFactory    from .spatialanalysistoolbox import
> >SpatialAnalysisToolboxPlugin  File
> >"C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 799, in _import
> mod
> >= _builtin_import(name, globals, locals, fromlist, level)  File
>
> >"C:/Users/fparente/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\spatialanalysistoolbox\spatialanalysistoolbox.py",
> >line 38, in    from .spatialanalysistoolbox_provider import
> >SpatialAnalysisToolboxProvider  File
> >"C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 799, in _import
> mod
> >= _builtin_import(name, globals, locals, fromlist, level)  File
>
> >"C:/Users/fparente/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\spatialanalysistoolbox\spatialanalysistoolbox_provider.py",
> >line 35, in    from .algorithms.GWR_ import GWR_  File
> >"C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 799, in _import
> mod
> >= _builtin_import(name, globals, locals, fromlist, level)  File
>
> >"C:/Users/fparente/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\spatialanalysistoolbox\algorithms\GWR_.py",
> >line 23, in    import geopandas as gpd  File
> >"C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 799, in _import
> mod
> >= _builtin_import(name, globals, locals, fromlist,
> >level)ModuleNotFoundError: No module named 'geopandas'Versione Python:
> >3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit
> >(AMD64)] Versione di QGIS: 3.18.2-Z?rich Z?rich, 515138c171 *
> >
> >I repeated the download/install procedure, but nothing changed.
> >Does anybody know how to fix this and/or alternative ways to test for
> >spatial autocorrelation here?
> >Thanks a lot and have a good day!
> >--
> >----------------------------
> >Francesca Parente
> >
> >_ SESS Euro PhD <https://iris.uniroma1.it/cris/rp/rp54329> in
> SocioEconomic
> >and Statistical Studies
> >_ Linked
> ><
> https://www.linkedin.com/in/francesca-parente-55194497/details/publications/
> >
> >in
> >
> >email: francescaparente.rse at gmail.com
> >      fparente at regione.lazio.it
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.osgeo.org/pipermail/qgis-user/attachments/20230810/e9edad66/attachment-0001.htm
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> QGIS-User mailing list
> QGIS-User at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
> ------------------------------
>
> End of QGIS-User Digest, Vol 210, Issue 8
> *****************************************
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230818/530e2634/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 18785 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230818/530e2634/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 48373 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230818/530e2634/attachment-0003.png>


More information about the QGIS-User mailing list