MeMe's don't group
SeanBannister - August 2, 2008 - 09:12
| Project: | Memetracker |
| Version: | 6.x-1.1-alpha3 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I've added about 50 feeds to my MeMeTracker and many contain very similar stories but they aren't grouping together.
I installed python-numeric on ubuntu :
apt-get install python-numeric
But instead of installing Pycluster I installed biopython because in the Pycluster INSTALL file it says:
Biopython versions 1.11 and up also contain Pycluster. There, it is referred to
as Bio.Cluster. See http://www.biopython.org.
For thoes interested you can install it with :
apt-get install python-biopython
I tried to install Pycluster from soure but recieved errors:
sean@eee:~/Pycluster-1.40$ ./setup.py install
running install
running build
running build_py
running build_ext
building 'Pycluster.cluster' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -Isrc -I/usr/include/python2.5 -c python/clustermodule.c -o build/temp.linux-i686-2.5/python/clustermodule.o
python/clustermodule.c:1:20: error: Python.h: No such file or directory
In file included from python/clustermodule.c:2:
/usr/include/python2.5/Numeric/arrayobject.h:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/usr/include/python2.5/Numeric/arrayobject.h:24: error: expected ‘)’ before ‘*’ token
/usr/include/python2.5/Numeric/arrayobject.h:29: error: expected specifier-qualifier-list before ‘PyArray_GetItemFunc’
/usr/include/python2.5/Numeric/arrayobject.h:49: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
/usr/include/python2.5/Numeric/arrayobject.h:71: error: expected specifier-qualifier-list before ‘Py_intptr_t’
python/clustermodule.c:20: error: expected ‘)’ before ‘*’ token
python/clustermodule.c: In function ‘free_data’:
python/clustermodule.c:85: error: ‘PyArrayObject’ has no member named ‘data’
python/clustermodule.c:87: error: ‘PyArrayObject’ has no member named ‘dimensions’
python/clustermodule.c:88: warning: implicit declaration of function ‘free’
python/clustermodule.c:91: warning: implicit declaration of function ‘Py_DECREF’
python/clustermodule.c:91: error: ‘PyObject’ undeclared (first use in this function)
python/clustermodule.c:91: error: (Each undeclared identifier is reported only once
python/clustermodule.c:91: error: for each function it appears in.)
python/clustermodule.c:91: error: expected expression before ‘)’ token
python/clustermodule.c: At top level:
python/clustermodule.c:98: error: expected ‘)’ before ‘*’ token
python/clustermodule.c: In function ‘free_mask’:
python/clustermodule.c:181: error: ‘PyArrayObject’ has no member named ‘data’
python/clustermodule.c:182: error: ‘PyObject’ undeclared (first use in this function)
python/clustermodule.c:182: error: expected expression before ‘)’ token
python/clustermodule.c: At top level:
python/clustermodule.c:191: error: expected ‘)’ before ‘*’ token
python/clustermodule.c: In function ‘free_weight’:
python/clustermodule.c:257: error: ‘PyArrayObject’ has no member named ‘data’
python/clustermodule.c:258: error: ‘PyObject’ undeclared (first use in this function)
python/clustermodule.c:258: error: expected expression before ‘)’ token
python/clustermodule.c: At top level:
python/clustermodule.c:266: error: expected ‘)’ before ‘*’ token
python/clustermodule.c:372: error: expected ‘)’ before ‘*’ token
python/clustermodule.c: In function ‘free_clusterid’:
python/clustermodule.c:473: error: ‘PyArrayObject’ has no member named ‘data’
python/clustermodule.c:474: error: ‘PyObject’ undeclared (first use in this function)
python/clustermodule.c:474: error: expected expression before ‘)’ token
python/clustermodule.c: At top level:
python/clustermodule.c:482: error: expected ‘)’ before ‘*’ token
python/clustermodule.c:514: error: expected ‘)’ before ‘*’ token
python/clustermodule.c: In function ‘create_celldata’:
python/clustermodule.c:724: error: ‘PyObject’ undeclared (first use in this function)
python/clustermodule.c:724: error: expected expression before ‘)’ token
python/clustermodule.c:724: error: expected ‘)’ before ‘PyArray_API’
python/clustermodule.c:728: warning: implicit declaration of function ‘Py_XDECREF’
python/clustermodule.c:728: error: expected expression before ‘)’ token
python/clustermodule.c:733: warning: implicit declaration of function ‘PyErr_SetString’
python/clustermodule.c:733: error: ‘PyExc_MemoryError’ undeclared (first use in this function)
python/clustermodule.c:736: error: ‘PyArrayObject’ has no member named ‘data’
python/clustermodule.c: At top level:
python/clustermodule.c:752: error: expected ‘)’ before ‘*’ token
python/clustermodule.c: In function ‘free_index’:
python/clustermodule.c:818: error: ‘PyObject’ undeclared (first use in this function)
python/clustermodule.c:818: error: expected expression before ‘)’ token
python/clustermodule.c: At top level:
python/clustermodule.c:827: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
python/clustermodule.c:832: error: expected declaration specifiers or ‘...’ before ‘PyObject’
python/clustermodule.c:832: error: expected declaration specifiers or ‘...’ before ‘PyObject’
python/clustermodule.c: In function ‘PyNode_init’:
python/clustermodule.c:838: warning: implicit declaration of function ‘PyArg_ParseTupleAndKeywords’
python/clustermodule.c:838: error: ‘args’ undeclared (first use in this function)
python/clustermodule.c:838: error: ‘kwds’ undeclared (first use in this function)
python/clustermodule.c:841: error: ‘PyNode’ has no member named ‘node’
python/clustermodule.c:842: error: ‘PyNode’ has no member named ‘node’
python/clustermodule.c:843: error: ‘PyNode’ has no member named ‘node’
python/clustermodule.c: At top level:
python/clustermodule.c:848: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
python/clustermodule.c:859: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
python/clustermodule.c:866: error: expected declaration specifiers or ‘...’ before ‘PyObject’
python/clustermodule.c: In function ‘PyNode_setleft’:
python/clustermodule.c:867: warning: implicit declaration of function ‘PyInt_AsLong’
python/clustermodule.c:867: error: ‘value’ undeclared (first use in this function)
python/clustermodule.c:868: warning: implicit declaration of function ‘PyErr_Occurred’
python/clustermodule.c:869: error: ‘PyNode’ has no member named ‘node’
python/clustermodule.c: At top level:
python/clustermodule.c:876: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
python/clustermodule.c:883: error: expected declaration specifiers or ‘...’ before ‘PyObject’
python/clustermodule.c: In function ‘PyNode_setright’:
python/clustermodule.c:884: error: ‘value’ undeclared (first use in this function)
python/clustermodule.c:886: error: ‘PyNode’ has no member named ‘node’
python/clustermodule.c: At top level:
python/clustermodule.c:890: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
python/clustermodule.c:896: error: expected declaration specifiers or ‘...’ before ‘PyObject’
python/clustermodule.c: In function ‘PyNode_setdistance’:
python/clustermodule.c:897: warning: implicit declaration of function ‘PyFloat_AsDouble’
python/clustermodule.c:897: error: ‘value’ undeclared (first use in this function)
python/clustermodule.c:899: error: ‘PyNode’ has no member named ‘node’
python/clustermodule.c: At top level:
python/clustermodule.c:906: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PyNode_getset’
python/clustermodule.c:919: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PyNodeType’
python/clustermodule.c:960: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
python/clustermodule.c: In function ‘PyTree_dealloc’:
python/clustermodule.c:967: error: ‘PyTree’ has no member named ‘n’
python/clustermodule.c:967: error: ‘PyTree’ has no member named ‘nodes’
python/clustermodule.c:968: error: ‘PyTree’ has no member named ‘ob_type’
python/clustermodule.c:968: error: ‘PyObject’ undeclared (first use in this function)
python/clustermodule.c:968: error: expected expression before ‘)’ token
python/clustermodule.c: At top level:
python/clustermodule.c:972: error: expected declaration specifiers or ‘...’ before ‘PyObject’
python/clustermodule.c:972: error: expected declaration specifiers or ‘...’ before ‘PyObject’
python/clustermodule.c: In function ‘PyTree_init’:
python/clustermodule.c:976: error: ‘PyObject’ undeclared (first use in this function)
python/clustermodule.c:976: error: ‘arg’ undeclared (first use in this function)
python/clustermodule.c:979: warning: implicit declaration of function ‘PyArg_ParseTuple’
python/clustermodule.c:979: error: ‘args’ undeclared (first use in this function)
python/clustermodule.c:981: warning: implicit declaration of function ‘PyList_Check’
python/clustermodule.c:982: error: ‘PyExc_TypeError’ undeclared (first use in this function)
python/clustermodule.c:986: warning: implicit declaration of function ‘PyList_GET_SIZE’
python/clustermodule.c:988: error: ‘PyExc_ValueError’ undeclared (first use in this function)
python/clustermodule.c:994: error: ‘row’ undeclared (first use in this function)
python/clustermodule.c:994: warning: implicit declaration of function ‘PyList_GET_ITEM’
python/clustermodule.c:995: error: ‘PyNodeType’ undeclared (first use in this function)
python/clustermodule.c:1002: error: ‘PyNode’ has no member named ‘node’
python/clustermodule.c:1035: error: ‘PyTree’ has no member named ‘n’
python/clustermodule.c:1036: error: ‘PyTree’ has no member named ‘nodes’
python/clustermodule.c: At top level:
python/clustermodule.c:1040: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
python/clustermodule.c: In function ‘PyTree_length’:
python/clustermodule.c:1066: error: ‘PyTree’ has no member named ‘n’
python/clustermodule.c: At top level:
python/clustermodule.c:1069: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
python/clustermodule.c:1086: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
python/clustermodule.c:1121: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PyTree_sequence’
python/clustermodule.c:1137: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
python/clustermodule.c:1161: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
python/clustermodule.c:1201: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PyTree_methods’
python/clustermodule.c:1215: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PyTreeType’
python/clustermodule.c:1266: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
python/clustermodule.c:1320: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
python/clustermodule.c:1511: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
python/clustermodule.c:1665: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
python/clustermodule.c:1859: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
python/clustermodule.c:2009: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
python/clustermodule.c:2075: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
python/clustermodule.c:2179: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
python/clustermodule.c:2339: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
python/clustermodule.c:2497: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
python/clustermodule.c:2623: error: array type has incomplete element type
python/clustermodule.c:2624: error: ‘PyCFunction’ undeclared here (not in a function)
python/clustermodule.c:2624: error: expected ‘}’ before ‘py_version’
python/clustermodule.c:2625: error: expected ‘}’ before ‘py_kcluster’
python/clustermodule.c:2626: error: expected ‘}’ before ‘py_kmedoids’
python/clustermodule.c:2627: error: expected ‘}’ before ‘py_treecluster’
python/clustermodule.c:2628: error: expected ‘}’ before ‘py_somcluster’
python/clustermodule.c:2629: error: expected ‘}’ before ‘py_median’
python/clustermodule.c:2630: error: expected ‘}’ before ‘py_mean’
python/clustermodule.c:2631: error: expected ‘}’ before ‘py_clusterdistance’
python/clustermodule.c:2632: error: expected ‘}’ before ‘py_clustercentroids’
python/clustermodule.c:2633: error: expected ‘}’ before ‘py_distancematrix’
python/clustermodule.c: In function ‘initcluster’:
python/clustermodule.c:2643: error: ‘PyObject’ undeclared (first use in this function)
python/clustermodule.c:2643: error: ‘m’ undeclared (first use in this function)
python/clustermodule.c:2645: error: ‘numpy’ undeclared (first use in this function)
python/clustermodule.c:2645: warning: implicit declaration of function ‘PyImport_ImportModule’
python/clustermodule.c:2645: error: ‘module_dict’ undeclared (first use in this function)
python/clustermodule.c:2645: warning: implicit declaration of function ‘PyModule_GetDict’
python/clustermodule.c:2645: error: ‘c_api_object’ undeclared (first use in this function)
python/clustermodule.c:2645: warning: implicit declaration of function ‘PyDict_GetItemString’
python/clustermodule.c:2645: warning: implicit declaration of function ‘PyCObject_Check’
python/clustermodule.c:2645: warning: implicit declaration of function ‘PyCObject_AsVoidPtr’
python/clustermodule.c:2647: error: ‘PyNodeType’ undeclared (first use in this function)
python/clustermodule.c:2647: error: ‘PyType_GenericNew’ undeclared (first use in this function)
python/clustermodule.c:2648: error: ‘PyTreeType’ undeclared (first use in this function)
python/clustermodule.c:2649: warning: implicit declaration of function ‘PyType_Ready’
python/clustermodule.c:2652: warning: implicit declaration of function ‘Py_InitModule4’
python/clustermodule.c:2656: error: ‘PYTHON_API_VERSION’ undeclared (first use in this function)
python/clustermodule.c:2659: warning: implicit declaration of function ‘Py_INCREF’
python/clustermodule.c:2661: warning: implicit declaration of function ‘PyModule_AddObject’
python/clustermodule.c:2661: error: expected expression before ‘)’ token
python/clustermodule.c:2662: error: expected expression before ‘)’ token
python/clustermodule.c:2664: warning: implicit declaration of function ‘Py_FatalError’
error: command 'gcc' failed with exit status 1I'm running :
Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2

#1
My first guess is Python-Numeric isn't installed. To install it, you know the drill:
sudo apt-get install python-numeric.BTW, are you running memetracker on an Asus Eee? If so, you'll have problems. Memetracker needs a lot of processor power to calculate memes, so under powered systems will be excessively slow.
#2
Yes, I've already installed python-numeric, as I mentioned in the first post.
And yes I'm on an EEE pc (at the moment), we'll see how the 900mhz processor handles it :)
#3
Sorry -- I do better at straight memetracker support. Are you installing Pycluster as root? With the normal Ubuntu setup, you're not logged in as root which might be the source of your errors.
#4
Yes I've tried installing it with sudo and after "su root".
I don't know python so it's a bit hard to work out what's going on.
#5
Ok just tried installing it on the server at work, also running Ubuntu and it won't compile. I'd be interested to hear if anyone else had any luck with Ubuntu.
These are the errors I recieved when compilling Python Numeric :
running buildrunning build_py
running build_ext
building '_numpy' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -IInclude -IPackages/FFT/Include -IPackages/RNG/Include -I/usr/include/python2.5 -c Src/_numpymodule.c -o build/temp.linux-i686-2.5/Src/_numpymodule.o
Src/_numpymodule.c:1:20: error: Python.h: No such file or directory
In file included from Src/_numpymodule.c:4:
Include/Numeric/arrayobject.h:23: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
Include/Numeric/arrayobject.h:24: error: expected â)â before â*â token
Include/Numeric/arrayobject.h:29: error: expected specifier-qualifier-list before âPyArray_GetItemFuncâ
Include/Numeric/arrayobject.h:49: error: expected specifier-qualifier-list before âPyObject_HEADâ
Include/Numeric/arrayobject.h:71: error: expected specifier-qualifier-list before âPy_intptr_tâ
Include/Numeric/arrayobject.h:257: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âPyArray_Typeâ
Include/Numeric/arrayobject.h:260: error: expected â)â before â*â token
Include/Numeric/arrayobject.h:264: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
Include/Numeric/arrayobject.h:265: error: expected â)â before â*â token
Include/Numeric/arrayobject.h:269: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
Include/Numeric/arrayobject.h:272: error: expected â)â before â*â token
Include/Numeric/arrayobject.h:275: error: expected â)â before â*â token
Include/Numeric/arrayobject.h:276: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
Include/Numeric/arrayobject.h:277: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
Include/Numeric/arrayobject.h:279: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
Include/Numeric/arrayobject.h:281: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
Include/Numeric/arrayobject.h:283: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
Include/Numeric/arrayobject.h:285: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
Include/Numeric/arrayobject.h:286: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
Include/Numeric/arrayobject.h:287: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
Include/Numeric/arrayobject.h:288: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
Include/Numeric/arrayobject.h:289: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
Include/Numeric/arrayobject.h:290: error: expected â)â before â*â token
Include/Numeric/arrayobject.h:291: error: expected â)â before â*â token
Include/Numeric/arrayobject.h:292: error: expected â)â before â*â token
Include/Numeric/arrayobject.h:293: error: expected â)â before â*â token
Include/Numeric/arrayobject.h:294: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
Include/Numeric/arrayobject.h:295: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
Include/Numeric/arrayobject.h:298: error: expected â)â before â*â token
In file included from Src/_numpymodule.c:6:
Include/Numeric/ufuncobject.h:14: error: expected specifier-qualifier-list before âPyObject_HEADâ
Include/Numeric/ufuncobject.h:97: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âPyUFunc_Typeâ
Include/Numeric/ufuncobject.h:101: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
Include/Numeric/ufuncobject.h:103: error: expected declaration specifiers or â...â before âPyObjectâ
Include/Numeric/ufuncobject.h:116: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token
Src/_numpymodule.c:10: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before ânumpy_methodsâ
Src/_numpymodule.c:17: warning: return type defaults to âintâ
Src/_numpymodule.c: In function âDL_EXPORTâ:
Src/_numpymodule.c:17: error: expected declaration specifiers before âinit_numpyâ
Src/_numpymodule.c:98: error: expected â{â at end of input
error: command 'gcc' failed with exit status 1
#6
So I've installed Python Numeric again via "sudo apt-get install python-numeric" but once again I can't install Pycluster-1.40, I googled the issues and found my own post :|
#7
Scott Hatfield (one of my mentors) suggested that python-dev might not be installed:
"error: Python.h: No such file or directory"
apt-get install python-dev
#8
Ok, I've finally got it worked out :)
In Ubuntu the gcc compiler is packaged separately from the C libraries and header files. So you have to "apt-get install build-essential" to get the libraries.
So if anyone else is having troubles here is what I did :
1. apt-get install gcc
2. apt-get install build-essential
3. apt-get install python-numeric
4. (a) Download pycluster http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/software/cluster/software.htm#p...
-- (b) Untar pycluster, and and go the the extracted directory
-- (c) python setup.py install
#9
Awesome Sean! Glad you figured that out. Looking forward to seeing your beautiful memes!
#10
Automatically closed -- issue fixed for two weeks with no activity.