[GRASS-windows] Python collections module

Frank Broniewski brfr at metrico.lu
Tue Feb 9 02:03:21 EST 2010


Hello,

Thanks for your answer, Glynn. I don't find a python25.dll in my stock 
installation, but it works too. I am just a little bit worried that the 
shipped version from the osgeo4w installer doesn't work as expected. When I 
replace the osgeo4w version with the stock version everything works.

Can someone confirm this? Sample code to reproduce my error:
test.py
--------------
import sys
import os
import grass.script as grass

gives me the below mentioned error. It's because Python25/Lib/threading.py 
does:
from collections import deque.

Now I wonder if I should report this as a bug, because reinstalling osgeo4w 
doesn't solve the problem. If someone can confirm this I would report it, 
but I hesitate. I will test this behavior on another installation today and 
I will see if I encounter this error message again.

Many thanks

Frank

--------------------------------------------------
From: "Glynn Clements" <glynn at gclements.plus.com>
Sent: Monday, February 08, 2010 9:11 PM
To: "Frank Broniewski" <brfr at metrico.lu>
Cc: "grass-windows" <grass-windows at lists.osgeo.org>
Subject: Re: [GRASS-windows] Python collections module

>
> Frank Broniewski wrote:
>
>> I am using the osgeo4w installation and I want to use the python 
>> scripting
>> possibilities.
>> When I try to import the grass module I get an ImportError "No module 
>> named
>> collections" from "C:\OSGeo4W\apps\Python25\lib\threading.py".
>> And indeed there is no collections.py. When I look into my Python26
>> installation dir, there is a collections.py in Python26\Lib. Is the 
>> osgeo4w
>> python package broken? Reinstalling does not fix the missing collections
>> module.
>> I appreciate any help with this problem
>
> The Python documentation says that the collections module was added in
> 2.4.
>
> I have both Python 2.5 and Python 2.6 installed on Windows (both are
> the stock python.org versions). 2.5 doesn't have a collections.py, but
> "import collections" works from the IDE. AFAICT, the collections
> module is built into python25.dll.
>
> -- 
> Glynn Clements <glynn at gclements.plus.com> 



More information about the grass-windows mailing list