From: John H. <jdh...@ac...> - 2004-05-13 11:16:31
|
>>>>> "Karthikesh" == Karthikesh Raju <ka...@ja...> writes: Since you are facing multiple issues, let's try and get the simplest build working and then add stuff in. First though, it would be helpful if you told me what devel rpms you needed to install so I recommend these on the web page to other users. BTW, the two pages most relevant for you with installation information are http://matplotlib.sf.net/installing.html and http://matplotlib.sf.net/backends.html. Make sure you give these a good read. From reading your email, I see that you are installing everything to your home dir, is that right? Step 1: start with a clean matplotlib src tree. I don't want to try and work with the one where you have hardcoded information in the code because then I don't know what is going on. Just untar the tar.gz file in a new dir and start cleanly Step 2: Edit setup.py and turn all the BUILD flags off, except for BUILD_FT2FONT. Let's try and get a working base install and then deal with getting the extension code compiled. Step 3: Edit setupext.py and add any non-standard base dirs in which you have installed stuff (eg /home/you/usr, /home/you/usr/local') to the basedirs dictionary at the top of that file. Your platform is linux2. Step 4: Install matplotlib with > python setup.py install Step 5: If the build doesn't finish cleanly (the only reason I can think it would fail is if you don't get ft2font built properly. This package requires lib freetype so make you have the freetype and freetype-devel libs installed. It also requires libz so make sure you have zlib and zlib-devel installed. If you have installed these to a nonstandard place, make sure you add the basedir to setupext basedirs. Step 6: OK, I'm assuming you have a clean install at this point. If you installed with a non-standard prefix, you need to set your MATPLOTLIBDATA environment variable. This data should point to the dir that contains, for example, all the Vera*.ttf files. Eg, /your/install/prefix/share/matplotlib. If you add this to your rc file, make sure you resource your rc or open a new shell. Step 7: At this point, if you have numarray and pygtk installed (1.99.16 or later), you should be able to import matplotlib. Open up python shell and make sure you can do >>> import pygtk >>> pygtk.require('2.0') >>> import gtk >>> import numarray >>> import matplotlib If not, let us know what error you are getting. You should now be able to run python simple_plot.py -dGTK Step 8: Edit setup.py and add the other build flags back in. You can set the ones you want to build to 'auto', which will try and build an extension if the python dependencies are found. If you still have problems with arrayobject.h, let me know. You can add the include path to that file in the build_image method in setupext.py by doing module.include_dirs.append('/your/path/to/numerix/headers') ie, /home/karthik/usr/include/python/numarray We do want to improve the build process for people who have stuff in non-default locations, and it would be very helpful for us if you tell us explicitly what you had to add and change in the steps above so we can incorporate as much as possible into the default. Good luck! JDH |