[reportlab-users] Reportlab compiling in Linux

David Frank david83 at sfsu.edu
Wed May 2 18:49:53 EDT 2007


Hello Uwe and Andy,

I dont know how to thank you and all the others who replied to my post. I
am making a lot of progress from your help.

I did everything in Uwe's reply and it seems that now it works much better
than usual. I dont hink I would need the '.pth' file now. I did get some
errors from the runAll.py but that was again from missing fonts, etc.
(though for some reason, these did not happen when I executed it on my
personal laptop with XP). The test_graphics_charts.py executed perfectly
and I got the pdf with the charts. This is very good since charts are the
primary graphics that I use.

Now I ran my own test python program (called newbars.py), just to test
reportab. This was a program to generate charts. Now I get this error:

Traceback (most recent call last):
File "newbars.py", line 7, in ?
from reportlab.graphics import renderPM
File
"/home/davidfrank/reportlab_2_0/reportlab/build/lib/reportlab/graphics/renderPM.py",
line 26, in ?
raise ImportError, "No module named _renderPM\n" + \
ImportError: No module named _renderPM
see http://www.reportlab.org/rl_addons.html

Now, seems to be that I cannot find renderPM.py though it is right there
at /home/davidfrank/reportlab_2_0/reportlab/build/lib/reportlab/graphics/.
The error report does tell me to go to the link,
http://www.reportlab.org/rl_addons.html, and download the rl_addons.

Now, here is the problem. I am a novice in Linux. In fact, a novice to a
novice. I am at this page
http://www.reportlab.co.uk/svn/public/reportlab/trunk/rl_addons/renderPM/
and I see all these files there but I do not know to which folder I should
download them and then do what next. I know I should run setup.py, but
from which folder and should all these files be in the same folder as
setup.py? I am really sorry to once again flood your Inboxes with my Linux
illiteracy. Please do advise me on this next step.

And Andy, looks like maybe my System Admin DID have his Python path setup
wrong!! Is there a way I can correct him? (so that future users do not
have to go through the same misery as I did)

Once again, I thank you all for helping me progress so much.

Thank you,

David





> David,

> you can test it yourself and get the errors to the list.

> I just tried that and I get 25 errors on the below procedure, all of

which are

> missing fonts or images for the test documents - and I know my

installation

> works just fine.



> Anyways, try this:



> grab reportlab and unpack it to some place in your home.

> cd into the directory and run:



> rm -rf build

> python setup.py build



> If that already throws errors post them here.

> If not:



> cd into the "test" directory.

> Edit the runAll.py script to have the beginning look like this:



> import os, glob, sys, string, traceback

> sys.path.append('../build/lib')

> from reportlab.test import unittest

> from reportlab.test.utils import GlobDirectoryWalker,

outputfile,printLocation


> The only change to the original is the sys.path.append statement.

> The path to append would be the lib directory in the build. It's

certainly

> important that the sys.path.append statement is before the import

reportlab

> statements :-)



> You can also use the same trick to just distribute reportlab together

with

> your application and modify the sys.path variable to add that directory

- no

> sysadmin neccessary.



> Hope that gets you further.



> Uwe




> I was out today but was going to point out that your sysadmin probably

> had his Python path set up wrong.



> Uwe is right, there's no reason you can't do everything on your own

> user account - as long as the C compiler is available. I have

> worked on many weird machines at client sites where it wasn't in a

> standard place, or needed special environment variables setting up -

> usually Java shops where compiling C code is unusual or a forgotten

> skill, or where some security cop has decided to limit what users can

> do in a brutal way. If "setup.py build" works, you're fine; if not

> we'll be able to help with the next step or possibly to get the one or

> two C libraries built elsewhere.




> Once you get this working you will also have proof that the sysadmin

> is either being unhelpful, or doesn't know what a Python package is.

> :-(



> - Andy



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20070502/22818551/attachment-0001.html>


More information about the reportlab-users mailing list