Home > HowTo, ubuntu > How to install pymatlab

How to install pymatlab

For a university project i had to deal with a web application written in python and some computations that are matlab based. Of course my webapp was in python so I had to find a library to interact with python. I’ve found pymatlab to be a good library for this goal.

Installing pymatlab was a bit tricky. I had to install matlab on Linux, then install the python-numpy package and then install pymatlab with this sets of commands


sudo -s

export LIBRARY_PATH=/usr/local/MATLAB/R2011a/bin/glnxa64/

export PATH=$PATH:/usr/local/MATLAB/R2011a/bin/
 export C_INCLUDE_PATH=/usr/local/MATLAB/R2011a/extern/include/
 apt-get install csh
 pip install pymatlab

Then I was able to run matlab inside my python programs.

About these ads
Categories: HowTo, ubuntu Tags: , ,
  1. 24/06/2012 at 18:17 | #1

    For a university project i had to deal with a web application written in python and some computations that are matlab based. Of course my webapp was in python so I had to find a library to interact with python. I’ve found pymatlab to be a good library for this goal.

  2. Claus F
    28/06/2012 at 17:01 | #2

    Thanks for your advices. Unfortunately they do no longer work with MATLAB R2012a
    I changed the version number in the file names, but the following errors occur

    /usr/bin/ld: cannot find -leng

    /usr/bin/ld: cannot find -lmx

    It would be great if the tool would be available even for more recent versions of MATLAB.

    Claus

  3. vincenzoampolo7
    04/07/2012 at 07:29 | #3

    It seems to be just a linker problem. Or… you can just grab the 2011 version :)

    Or… if you don’t have a lot of .mat , just use numpy & scipy. they are much more powerful

  4. vincenzoampolo7
    25/09/2012 at 07:18 | #4

    There was a Typo. It’s LIBRARY_PATH and not LD_LIBRARY_PATH.

    Now it should work on matlab 2012 too.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 491 other followers

%d bloggers like this: