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 1
I'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
Comments
Comment #1
kyle_mathews commentedMy 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.
Comment #2
SeanBannister commentedYes, 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 :)
Comment #3
kyle_mathews commentedSorry -- 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.
Comment #4
SeanBannister commentedYes 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.
Comment #5
SeanBannister commentedOk 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 :
Comment #6
SeanBannister commentedSo 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 :|
Comment #7
kyle_mathews commentedScott Hatfield (one of my mentors) suggested that python-dev might not be installed:
Comment #8
SeanBannister commentedOk, 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
Comment #9
kyle_mathews commentedAwesome Sean! Glad you figured that out. Looking forward to seeing your beautiful memes!
Comment #10
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #11
Sajid Shah commentedIf you extracted Pycluster-1.49.tar.gz on Desktop then following (otherwise instead of Desktop, go to that directory where you have extracted it):
sajid@ubuntu:~/Desktop$ su root
Password: ******* (here you have to give your own password for the system)
root@ubuntu:/home/sajid/Desktop# apt-get install gcc
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
root@ubuntu:/home/sajid/Desktop# apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
root@ubuntu:/home/sajid/Desktop# apt-get install python-numeric
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-numeric is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
root@ubuntu:/home/sajid/Desktop# apt-get install python-numpy
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-numpy is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
root@ubuntu:/home/sajid/Desktop# cd Pycluster-1.49
root@ubuntu:/home/sajid/Desktop/Pycluster-1.49# python setup.py install
running install
running build
running build_py
running build_ext
running install_lib
creating /usr/local/lib/python2.6/dist-packages/Pycluster
copying build/lib.linux-x86_64-2.6/Pycluster/__init__.py -> /usr/local/lib/python2.6/dist-packages/Pycluster
copying build/lib.linux-x86_64-2.6/Pycluster/cluster.so -> /usr/local/lib/python2.6/dist-packages/Pycluster
byte-compiling /usr/local/lib/python2.6/dist-packages/Pycluster/__init__.py to __init__.pyc
running install_egg_info
Writing /usr/local/lib/python2.6/dist-packages/Pycluster-1.49.egg-info