Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Have I broken my installation?

Reply
Thread Tools

Have I broken my installation?

 
 
Erik Max Francis
Guest
Posts: n/a
 
      06-28-2003
Matt Mower wrote:

> I made one small adjustment, specifying the --prefix=/opt/python
> option to put PyXML in the same directory as Python 2.2.


Well, that's your problem right there. Note the symptomology of what
Martin von Loewis asked you to test -- it prints different things for
your interactive usage and the CGI script.

> My entire Python developing experience runs to about an afternoons
> worth so I have no idea why PyXML isn't working or isn't being found.


That's because the problem you're running into here is a difference in
environment between you running the program in your interactive shell
and Apache running it as nobody. It's a general Unix issue, not
specific to Python.

> Can you suggest anything?


The problem is that you've installed PyXML in /opt/python, which is a
nonstandard place -- though that isn't in and of itself wrong if you
know what you're doing. You've obviously adjusted your interactive
environment to look in /opt/python, since you're running the scripts
without problems locally, but CGI scripts do not run in your
environment, and so aren't seeing what you've installed in /opt/python,
since that is a nonstandard place. For a quick remedy, add something
like this:

import sys
sys.path.append('/opt/python')

to the top of your script. A more permanent solution would involve
adding it to /usr/local/lib/pythonX.Y/site.py.

--
Erik Max Francis && http://www.velocityreviews.com/forums/(E-Mail Removed) && http://www.alcyone.com/max/
__ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/ \ Every astronaut who goes up knows the risks he or she faces.
\__/ Sally Ride
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why are "broken iterators" broken? Steven D'Aprano Python 8 09-28-2008 09:19 PM
Re: Why are "broken iterators" broken? Fredrik Lundh Python 0 09-22-2008 04:32 PM
Re: Why are "broken iterators" broken? Cameron Simpson Python 0 09-22-2008 04:32 AM
how could i have broken uri? Colin Summers Ruby 1 06-25-2007 06:00 AM
Help - I have a number of Broken Links bill@nospam.net Computer Support 2 11-20-2003 05:27 PM



Advertisments