FW: [Qgis-user] Python modules (dependencies?)

Alister Hood alister.hood at synergine.com
Thu Dec 15 15:16:32 PST 2011


Forwarding to the list without the attachment.

> -----Original Message-----
> From: Alister Hood
> Sent: Friday, 16 December 2011 11:53 a.m.
> To: 'qgis-user at lists.osgeo.org'
> Cc: 'thomas.boyd at nrl.navy.mil'
> Subject: [Qgis-user] Python modules (dependencies?)
> 
> > Date: Thu, 15 Dec 2011 10:03:08 -0500
> > From: "Thomas J. Boyd" <thomas.boyd at nrl.navy.mil>
> > Subject: [Qgis-user] Python modules (dependencies?)
> > To: qgis-user at lists.osgeo.org
> > Message-ID: <4EEA0C2C.10104 at nrl.navy.mil>
> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> >
> > Dear List users,
> >
> > I have been unable to find an answer to this via searching, so here
> > goes: I use QGIS v.1.7.2 (now 1.7.3) windows binaries. I want to use
> > the contour plugin. According the docs, it requires shapely, numpy,
> > and matplotlib. The contour python files are loaded into my
documents
> > directory in sub /.qgis/python/plugins/contour.
> 
> As already mentioned, those dependencies are all available in the
> osgeo4w installer (the first two are listed under "python-").  They
are
> also all included in the standalone QGIS installer.  The contour
plugin
> used to work out of the box.
> 
> > After installing either the 2.5 or 2.7 python binaries and libraries
> > (including numpy, shapely and matplotlib), I still get errors trying
> > to use contour.
> 
> Is the error "Exception struck: 'module' object has no attribute
> 'tricontour'"?
> It seems the contour plugin has been updated and now requires a later
> version of matplotlib than is included with QGIS / OSGeo4W :(
> 
> > I did default install(s) for python (in the "Program files"
> > directory). I tried copying over the numpy, shapely and matplotlib
> > python files to my .qgis/python/plugins folder
> 
> If you do need to install python modules manually, they go in
> "C:\Program Files\Quantum GIS Wroclaw\apps\Python25\Lib\site-packages"
> with a standalone QGIS install or "C:\OSGeo4W\apps\Python25\Lib\site-
> packages" with an OSGeo4w install.
> 
> But in this case it doesn't work.  If I install a later matplotlib, I
> can run `import matplotlib` in the QGIS python, but `import
> matplotlib.pyplot as plt` crashes it (Python itself, not just when run
> in the QGIS python console).
> Maybe this matplotlib was build with an incompatible compiler or
> something...
> Of course I can't build my own matplotlib to see if it works:
> 
> running build_ext
> error: Python was built with Visual Studio 2003; extensions must be
> built with a compiler than can generate compatible binaries.
> Visual Studio 2003 was not found on this system. If you have Cygwin
> installed, you can try compiling with MingW32, by passing "-c mingw32"
> to setup.py.
> 
> Well, maybe I could trick it into compiling, but I'm not sure it would
> be worth the effort.
> Conclusion: use a real operating system.
> Or use the slight workaround described at
> http://youarealegend.blogspot.com/2011/10/contour-plugin-for-qgis-
> version-090.html
> Or use an old version of the plugin (I've attached one I had lying
> around, but I think there might have been more recent versions that
> still worked).
> 
> > but get errors loading
> > QGIS (for either 2.5 32-bit or 2.7 64-bit python installs).
> 
> Since the QGIS install is 32bit, with Python 2.5, any Python modules
> you use will need to be the as well.
> 
> > I can run
> > "other" python scripts in a command window (so the python
interpreter
> > is "registered" I think). I can run numpy, shapely and matplotlib
> > functions in IDLE without issue.
> >
> > Has anyone had experience running contour plugin on a windows
> machine?
> > Any install tips? I am using Win7 64-bit. Thanks in advance for any
> > assistance.
> >
> > Tom
> 
> Alister



More information about the Qgis-user mailing list