[Qgis-user] Using the qplanet plugin on Windows? - pysqlite2, scipy
Alister Hood
alister.hood at synergine.com
Fri Sep 17 00:51:18 PDT 2010
OK,
The latest version of scipy didn't work because the osgeo numpy is too old. I went right back to 0.6.0 and now I can import scipy successfully. All I had to do was open the installer with 7-zip and copy the scipy folder into my site-packages folder.
I then had to make the same `import sqlite3` edit to $HOME/.qgis/python/plugins\Qplanet\planetsasha.py
It then failed at:
File "C:/Documents and Settings/alister.hood/.qgis/python/plugins\Qplanet\gps.py", line 11, in
NaN = float('nan')
ValueError: invalid literal for float(): nan
This seems to be a problem on Windows:
http://bytes.com/topic/python/answers/803393-numpy-handling-float-nan-different-xp-vs-linux
I replaced the offending line in gps.py with the following code and now the plugin loads:
from numpy import nan
NaN = nan
Since I don't know how to use the plugin I'll need to come back some other time to see if it actually works :) (I thought I saw some instructions, but I don't know where).
I notice I get an error message if I click Plugins>Planet Sasha>Planet Sasha, but I'm guessing this could just a minor bug - that it doesn't check whether I've set up the preferences or something.
Alister
-----Original Message-----
From: Alister Hood
Sent: Friday, 17 September 2010 6:34 p.m.
To: qgis-user at lists.osgeo.org
Subject: RE: [Qgis-user] Using the qplanet plugin on Windows? - pysqlite2, scipy
Sorry Alexander, I always forget to click reply all.
-------------------
Hi Alexander,
> -----Original Message-----
> From: Alexander Bruy [mailto:alexander.bruy at gmail.com]
> Sent: Friday, 17 September 2010 6:23 p.m.
> To: Alister Hood
> Cc: qgis-user at lists.osgeo.org
> Subject: Re: [Qgis-user] Using the qplanet plugin on Windows? -
> pysqlite2, scipy
>
> Hi Alister,
>
> 2010/9/17 Alister Hood <alister.hood at synergine.com>:
> > Hi everyone.
> > I thought I'd try the qplanet plugin, but it wouldn't load,
> > producing this error:
> >
> > ...
> > File "C:\Documents and
> > Settings\alister.hood/.qgis/python/plugins\Qplanet\modelite.py",
> > line 4, in
> > from pysqlite2 import dbapi2 as sqlite3
> > File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 279,
> > in _import
> > mod = _builtin_import(name, globals, locals, fromlist, level)
> > ImportError: No module named pysqlite2
> >
> > I have no idea whether this would work, but I tried editing
> > modelite.py to replace the offending line with `import sqlite3`, and
> > it now produces this error:
>
> Seems that you need to install pyspatialite package. This package
> available via OSGeo4W installer in Libs section
It is installed. It just doesn't seem to contain pysqlite2
>
> > File "C:/Documents and
> > Settings/alister.hood/.qgis/python/plugins\Qplanet\Shp2Shp.py", line
> > 14, in
> > from scipy import io, linalg
> > File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 279,
> > in _import
> > ImportError: No module named scipy
> >
> > I can't spot scipy in the osgeo installer. Is there any way on
> > Windows to install extra python modules that aren't in the osgeo
> > installer? The installer from scipy's website fails, complaining
> > that there is no Python in the registry, which is what the
> > installers for most python modules seem to do.
>
> Try to unpack scipy installer with arhiever (7-zip or something
> other), find Python modules and copy them to OSGeo4W Python folder
Ah, I tried that, but I think I just didn't go far enough. When I tried opening the .exe inside the .exe it ran it instead. But if I extract the .exe inside the .exe then I can open it... I'll try again.
>
>
> --
> Alexander Bruy
Thanks.
More information about the Qgis-user
mailing list