我读到关于python + mongo + monary对于使用mongodb的numpy panda处理非常快 Alex Gaudio的博客http://alexgaudio.com/2012/07/07/monarymongopandas.html
我正在尝试安装monary驱动程序,我从
中选择 Windows 64位上的https://pypi.python.org/pypi/Monary。我有Ananconda python 2.7发行版。
python ./setup.py install
我遇到了以下冲突错误。
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
我可以将monary中OBJECTID的所有引用更改为BOBJECTID之类的东西并摆脱重新定义或undef OBJECTID之前,我不知道同样的副作用?寻找答案或Monary的Windows安装
答案 0 :(得分:1)
您需要安装MinGW(http://www.mingw.org/)并使用它来安装gcc。然后你需要将C:\ MinGW \ bin(或任何你的安装路径)添加到你的PATH变量中,如下所示: