Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I tried to install Pythonika on my Ubuntu 14.04 (64) with python 2.7.6. I follow Salem's answer, but there is some errors. The Makefile.linux

# Set the paths according to your MathLink Developer Kit location.
# (The paths should not contain whitespaces)

MATHEMATICA_INSTALL_DIR = /usr/local/Wolfram/Mathematica/10.0
MLINKDIR = ${MATHEMATICA_INSTALL_DIR}/SystemFiles/Links/MathLink/DeveloperKit

SYS = Linux-x86-64
CADDSDIR = ${MLINKDIR}/${SYS}/CompilerAdditions


MPREP = "${CADDSDIR}/mprep"
MCC = "${CADDSDIR}/mcc"

# Modify the following for Python versions other than 2.6

# Path to the Python includes (modify according to Python version)

PYTHONIKA = Pythonika

# libstdc++ and librt are, apparently, needed for correct compilation under Linux
# with libMLi3 statically linked
##     Ununtu 14.04 
LIBS = -L${LIBDIR} ${LIBDIR}/libML64i3.a -lstdc++ -lpthread -lm -lrt -    lpython${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}

all : Pythonika

Pythonika: ${PYTHONIKA}.o ${PYTHONIKA}tm.o



clean :

The error is

cc -I/usr/local/Wolfram/Mathematica/10.0/SystemFiles/Links/MathLink/DeveloperKit/Linux-x86-64/CompilerAdditions -I/usr/include/python2.7/ Pythonika.o Pythonikatm.o -L/usr/local/Wolfram/Mathematica/10.0/SystemFiles/Links/MathLink/DeveloperKit/Linux-x86-64/CompilerAdditions        /usr/local/Wolfram/Mathematica/10.0/SystemFiles/Links/MathLink/DeveloperKit/Linux-x86-64/CompilerAdditions/libML64i3.a -lstdc++ -lpthread -lm -lrt -lpython2.7 -o Pythonika
Pythonikatm.o: In function `MLAnswer':
Pythonikatm.c:(.text+0xba8): undefined reference to `MLWaitForLinkActivity'
/usr/local/Wolfram/Mathematica/10.0/SystemFiles/Links/MathLink/DeveloperKit/Linux-x86-64/CompilerAdditions/libML64i3.a(mluuid.cpp.o): In function `MathLink::MLUUID::stringRepresentation() const':
mluuid.cpp:(.text+0x7e): undefined reference to `uuid_unparse_upper'
/usr/local/Wolfram/Mathematica/10.0/SystemFiles/Links/MathLink/DeveloperKit/Linux-x86-64/CompilerAdditions/libML64i3.a(mluuid.cpp.o): In function `MathLink::MLUUID::operator=(std::basic_string<char, std::char_traits<char>, MathLink::MLStdAllocator<char> > const&)':
mluuid.cpp:(.text+0xd4): undefined reference to `uuid_parse'
/usr/local/Wolfram/Mathematica/10.0/SystemFiles/Links/MathLink/DeveloperKit/Linux-x86-64/CompilerAdditions/libML64i3.a(mluuid.cpp.o): In function `MathLink::MLUUID::MLUUID(std::basic_string<char, std::char_traits<char>, MathLink::MLStdAllocator<char> > const&)':
mluuid.cpp:(.text+0x17b): undefined reference to `uuid_parse'
/usr/local/Wolfram/Mathematica/10.0/SystemFiles/Links/MathLink/DeveloperKit/Linux-x86-64/CompilerAdditions/libML64i3.a(mluuid.cpp.o): In function `MathLink::MLUUID::MLUUID()':
mluuid.cpp:(.text+0x227): undefined reference to `uuid_generate'
collect2: error: ld returned 1 exit status
make: *** [Pythonika] Error 1
share|improve this question
What error(s) did you get while installing? – M.Tarun Sep 27 '13 at 13:56
@M.Tarun I even cannot find the file to install, so no error. Thanks! – Eden Harder Sep 27 '13 at 14:45
@M.Tarun Thanks! I download the first file but cannot open it. And the rest files may be not for Ubuntu. – Eden Harder Sep 28 '13 at 1:50
@EdenHarder Have you solved your problem? – Salem Apr 18 '14 at 12:14

2 Answers 2

None of the compiled versions available match your OS/arch, so you will need to compile it by yourself. Roughly, you need to follow those steps:

  • Install the building tools

    $ sudo apt-get install build-essential subversion python-dev
  • Get the source code:

    $ svn checkout pythonika-src
    $ cd pythonika-src
  • Edit the file Makefile.linux and check the path in MATHEMATICA_INSTALL_DIR is correct. Also you will need to change PYTHON_VERSION_MINOR to "7" (if you are using the python version installed by default).

  • Compile it

    $ make -f Makefile.linux

If everything went well, you should have a file named Pythonika inside that folder. If you get any error, update your question with the errors you get.

share|improve this answer
Mat says: "I get following error on Ubuntu 12: sudo make -f Makefile.linux cc -c Pythonika.c -I/usr/local/Wolfram/M[...] /bin/sh: 1: /usr/local/Wolfram/Mathematica/9.0/SystemFiles/Links/MathLink/DeveloperKit/Linux‌​/CompilerAdditions/mprep: not found make: *** [Pythonikatm.o] Error 127 – MadMike Nov 7 '13 at 5:50
@MadMike Well it seems you don't have Mathematica or MathLink installed, or it is installed somewhere else. See if this helps:… – Salem Nov 7 '13 at 19:17

You have to install uuid-dev package. You can do so by executing this command in Terminal (to launch Terminal do CRTL + ALT + T):

sudo apt-get install uuid-dev

And say in Makefile.linux file that you need the library To do that, edit the file and add -luuid to the line:

LIBS = -L${LIBDIR} ${LIBDIR}/libML64i3.a -lstdc++ -lpthread -lm -lrt -lpython${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}

So you should have something like this:

LIBS = -L${LIBDIR} ${LIBDIR}/libML64i3.a -lstdc++ -luuid -lpthread -lm -lrt -lpython${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}

That's all.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.