Suresh Mali
Suresh Mali

Reputation: 348

python monary 0.2.3 (mongo monary driver): error in setup on windows 64bit (Anaconda distribution)

I read about python+mongo+monary is extremly fast for numpy panda processing working with mongodb on Alex Gaudio's blog http://alexgaudio.com/2012/07/07/monarymongopandas.html

I am trying to install monary driver, which i picked up from

https://pypi.python.org/pypi/Monary on windows 64 bit. I have Ananconda python 2.7 distribution.

python ./setup.py install

I am getting following conflict error.

monary/cmonary.c:46:20: error: conflicting types for 'OBJECTID'
In file included from e:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/
../../../../x86_64-w64-mingw32/include/windef.h:137:0,
                 from e:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/
../../../../x86_64-w64-mingw32/include/windows.h:59,
                 from mongodb-mongo-c-driver-74cc0b8/src/mongo.h:25,
                 from monary/cmonary.c:8:
e:\anaconda\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64
-mingw32/include/winnt.h:457:5: note: previous declaration of 'OBJECTID' was her
e
monary/cmonary.c: In function 'monary_load_timestamp_value':
monary/cmonary.c:247:9: warning: dereferencing type-punned pointer will break st
rict-aliasing rules [-Wstrict-aliasing]
monary/cmonary.c: In function 'monary_load_query':
monary/cmonary.c:519:9: warning: unused variable 'total_values' [-Wunused-variab
le]
error: command 'E:\\Anaconda\\Scripts\\gcc.bat' failed with exit status 1

I can change all all reference of OBJECTID in monary to something like BOBJECTID and get rid of re-definition or undef OBJECTID before, I dont know the side effects of same? looking for an answer or a windows install of Monary

Upvotes: 2

Views: 478

Answers (1)

Cameron Pye
Cameron Pye

Reputation: 53

You need to have MinGW installed (http://www.mingw.org/) and use it to install gcc. Then you need to add C:\MinGW\bin (or whatever your install path is) to your PATH variable like in this answer:

libgmp-10.dll is missing

Upvotes: 1

Related Questions